trying to code a function - see below - any help would be appreciated - trying to compute x and y by integrarting the ODE using Huens method but can use ODE solvers.
function [x,y] = odeHuen (f,x0,h,nSteps,y0)
here need code to Compute x and y by integrating the ODE system using Huen's method.
here is the call to action function:
f = @(x,y) [y(2); -y(1)];
x0 = 0; h = 0.1; nSteps = 100; y0 = [1; 0];
[x,y] = odeHuen(f,x0,h,nSteps,y0);