rkmidb - n for i = 0:n-1 w(i+2,1) = w(i+1,1) +

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
function w = rkmidb(func,a,b,iv,h) % % Runge-Kutta Midpoint Method, order 2. with break!!!!!!! % w(1,1)=iv; w % (b-a)/n = h . ...n= (b-a)/h n = (b-a)/h;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: n for i = 0:n-1 w(i+2,1) = w(i+1,1) + h*func(a+i*h+h/2,w(i+1,1)+h/2*func(a+i*h,w(1+i,1))); if(w(i+2,1)<0) break; end; end;...
View Full Document

This note was uploaded on 09/19/2009 for the course MATH numerical taught by Professor Ford during the Spring '09 term at FAU.

Ask a homework question - tutors are online