
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
how to use midpoint method to solve differential equations
Typology: Exercises
1 / 1
This page cannot be seen from the preview
Don't miss anything!

a = (left end of the domain); b = (right end of the domain); h = (step size); F = @(s,r) (function y'=...); t = a:h:b; y = zeros(size(t)); y(1) = (initial data); % set the initial condition for n=1:length(t)- y(n+1) = y(n) + hF(t(n) + h/2, y(n) + (h/2)F(t(n),y(n))) end