Hello everyone!!! I'm writing because I should write this subroutine:
Given the Cauchy problem
write a subroutine for the calculation of its solution using the predictor corrector method in 5 steps (k = 4), according to the PECE scheme, with fixed step.
for the initiation values use the Matlab routine ode45.
So, I have this program but I need of to do some tests but I don't understand what kind of functions I should use...so, you can give me an example of tests that can I do? This is the program:
% The function calculates the solution of the Cauchy problem
% takes as input a function, the initial condition, the extremes of the %integration interval and the width of interval
[t0,m_i]=ode45(fty,[t(1) t(2) t(3) t(4)],y0);
for i = 4:p
fnew= feval (fty, t0(4), mi);
f_i0= feval (fty, t0(4)+h, m_i0);
f(1,:) = f(2,:);
f(2,:) = f(3,:);
f(3,:) = fnew;
t0 = t0 + h;
Sorry for my mistakes...but I am Italian!!!! Thanks in advance!!!!