I have a system of reaction-diffusion PDEs in one spatial dimension (the two independent variable are time and x). I am trying to find the steady state solution. I tried to set the time derivatives to 0, so that the PDEs become ODEs, and then I tried to solve the system of ODEs using the bvp4c and bvp5c commands. However, I had problems with non-unique solutions, and the calculated solution was way too sensitive to my initial guess.
Therefore, I gave up on that method, and now I want to solve the system of PDEs until it reaches steady state. Is there a way that I can tell Matlab to stop solving once the system reaches steady state (based on some tolerance)? I know I can do this manually, by simply calling "pdepe" iteratively until the system reaches steady state, but I was wondering if I can avoid having to do this by just being able to tell Matlab to stop the simulation once the steady state has been reached.