Working with modified code -2024A
7 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
nathan blanc
il 16 Giu 2024
Commentato: nathan blanc
il 17 Giu 2024
I am working with a slightly modified version of ode113 (basically we copied ode113 into a new function ode113a and made some modifications there). Until now I was using the same code I copied and pasted and modified a few versions ago. Now in 2024A I got an error message, so I copied the code of ode113 again into a new file and modified again. However, a new problem has risen- it seems that 2023 is dependant on private functions, and I am now getting "unrecognized function or variable" errors. A workaround that I found is copying all the relevant private folders into a new folder. Is that the best way to solve the issue?
many thanks
Nathan
2 Commenti
Steven Lord
il 16 Giu 2024
What modification did you make to ode113? Why did you need to modify it? Is it possible to achieve the same results without modifying the function that is part of MATLAB?
The best solution is not to modify functions that are included with MATLAB, as other functions in MATLAB may depend on it and so you could impact the basic functionality of MATLAB.
Risposta accettata
Steven Lord
il 16 Giu 2024
If your system of ODEs is taking a long time, it may be stiff. Try using one of the stiffer solvers.
Alternately you could try creating either an EventFcn or an OutputFcn and have them stop the solver if enough time has elapsed since the solver started.
Finally, you could send an enhancement request for the ODE solvers to have an option for a timeout to Technical Support.
Più risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!