For matching a standard tri-axial stress-strain graph with a modified cam-clay model. I was facing a problem in MATLAB: after some iterations, it would reach a critical state and remain there for more iterations. After that, it started to harden and p and q kept on increasing.