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.© BrainMass Inc. brainmass.com October 24, 2018, 9:11 pm ad1c9bdddf
I am assuming that the fun.m.txt is the function you wanted to implement. Any other function
which finds (dy/dt) = y' = f(t,y) could be substituted . For example if you change f(t,y) as follows to get a solution for y' = y - t^2 + 1 (as in the problem in the book)
function z =f(t,y)
z = y - t^2 + 1
The function is given below. This is a as is implementation of the algorithm in the book
To use it save it as runga.m , open and type runga(a,b, N , ...
The Euler Formula is formulated as a Runga-Kutta Fourth Order problem in Matlab.