Hello,
for my project (stabilization of a reaction-diffusion problem with mass-lumping of a matrix) I would like to make a slight change in the actual version of the built-in MATLAB function solveStationaryNonlinear.m.
I'm almost sure it's not possible, since every change I try to introduce in the built-in function can't be saved.
So, in order to solve the problem now I need to:
1) run the code in debug mode;
2) stop the execution in solveStationaryNonlinear.m, when the matrix I want to modify has been created;
3) modify the matrix from the command line;
4) re-start running the code.
Since this matrix is modified at every step of a for loop, I have to stop the execution during each iteration, and this makes the code slow and difficult to use for any other user.
I can see two possible solutions, but I'm not able to get them right:
1) save modified MATLAB built-in functions (but I'm almost sure it's impossible, as I have already said);
2) write the debugging commands (such as dbstop, dbstep…) and the modification of the matrix corresponding to steps 1)-4) in a separate m-file, and then run this file instead of using the command line, so that any other user would just have to wait for the code to run, without writing on the command line. This seemed to be the solution to me; however, the execution just stops after introducing the breakpoint in solveStationaryNonlinear.m (as it should be, unfortunately), and the only way to modify the matrix is by operating from the command line.
Any help would be appreciated (even different ideas!).
Thanks,
Claudio
Best Answer