chapra problem 25.7 (solving ode with euler method)
Afficher commentaires plus anciens
I want to make a code to solve the problem in the image ,but when i run the program i get the following errors and i can not understand the mistake,if anyone can help me to understand my code problem .

My code
function [t,y,z] =p25_7(f1,f2,t1,t2,y0,z0,h)
t=t1:h:t2;
t =t';
n=length(t);
y=zeros(n,1);
z=zeros(n,1);
y(1)=y0;
z(1)=z0;
for i=1:n-1
y(i+1) = y(i) + f1(t(i) , y(i))*h ;
z(i+1) = z(i) + f2(y(i) , z(i))*h ;
end
command window

Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Function Creation dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!