chapra problem 25.7 (solving ode with euler method)
이전 댓글 표시
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

채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Function Creation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!