Matlab : Euler Formula and Runga-Kutta Fourth Order
I am posting formula called Runge Kutta Fourth Order. This formula need to be written in a matlab program.
I attached sample program how to generate euler formula in mathlab. Based on this program, can any one send matlab program for Runga Kutta Fourth Order?
See attached files for full problem description.
This question has the following supporting file(s):
- Numerical Analysis(8th Edition) page 278.jpg
- Numerical Analysis(8th Edition) page 279.jpg
The Euler Formula is formulated as a Runga-Kutta Fourth Order problem in Matlab.
This answer includes:
- Plain text
- Cited sources when necessary
Extracted Content from Question Files:
function z= euler_putc(a,b,y0,h,maxits)
while i<=b && i<=maxits
w(i)=w(i-1) + h * fun(t,w(i-1));
t(i)=a + i * h;
z = [t;w]
function z= euler_putcha(a,b,y0,h,maxits)
while k<=b && k<=maxits
z = [t;w]
function z = fun(t,y)
z = y/t-(y/t)^2;