How i can use this code with the funz=3*x^2

3 views (last 30 days)
function [t,y]=euler_FORWARD(funz,intervallo,y0,ninterval)
t0=intervallo(1)
tend=intervallo(2)
h==(tend-t0)/ninterval
t=t0
y=y0
for i=1:ninterval
t(i+1)=t(i)+h
y(i+1)= y==(i) + funz(t(i),y(i))*h
end

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!