Paste: diff

Author: stuff
Mode: text
Date: Thu, 5 Apr 2012 07:31:26
Plain Text |
% Euler's Method, given the rhs of a first order diffEQ
% Takes the same inputs as ode45

function [T,Y]=euler(myfunc,tspan,y0)
[T Y h num_pts]=prep_solver(tspan);
Y(1)=y0;
for i=1:num_pts-1
    Y(1,i+1)=Y(1,i)+h*k*Y(4,i);
    for j=1:num_pts
       Y(1,i,j+1)=Y(3,i,j);
       Y(
    end
end

New Annotation

Summary:
Author:
Mode:
Body: