Hello,
I have a problem about my code. I take a error code "Error in Untitled (line 18) l(x+1)=l(x)-(((c*h)/3)*l(x+1))-16*m(x+1)*h"
How can I correct this?
Thank you from now.
clear allc=30;u(1)=1;v(1)=-2;h=0.1;m(1)=1;l(1)=-2;%explicit euler
for n=1:10 u(n+1)=u(n)+(h*v(n)) v(n+1)=v(n)-(((c*h)/3)*v(n))-16*u(n)*h; n=1:11; end%implicit euler
for x=1:10 m(x+1)=m(x)+(h*l(x)) l(x+1)=l(x)-(((c*h)/3)*l(x+1))-16*m(x+1)*h; end
Best Answer