Solving System differential equation
Mostra commenti meno recenti
Risposte (1)
you could solve it with ODE45
your function is:
function dy = my_ODE(t,y)
dy=zeros(2,1);
dy=[1 2;3 4]*[y(1);y(2)]+[0;1];
end
and you should solve it with ODE45 with this script :
Time=2; %2seconds
InitialValues=[0;0];
[t,y]=ode45(@my_ODE,[0 Time],InitialValues)
plot(t,y(1),'-',t,y(2),'-.')
legend('y(1)','y(2)')
Categorie
Scopri di più su Mathematics in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!