ode45 output
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi, I'm having trouble getting a list of values from my function.
function dT=odefun(t,T)
global T1 ...etc
... etc
T2=T1*((P2/P1)^n_ex);
dT=zeros(3,1);
dT(1)=...etc
T1=T2;
How can I get ode45 to return a list of all calculated values for T1, as for dT(3,1) and not just the last value?
Thank you
2 Commenti
Andrew Newell
il 10 Feb 2012
I strongly suspect that you have written odefun incorrectly. You are using a global variable to make each evaluation dependent on the previous one, which is not good practice. If you could add a description of your problem to your question, we might be able to help you sort it out.
Risposte (0)
Vedere anche
Categorie
Scopri di più su Ordinary Differential Equations in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!