I have written this code as my function code for third order differential ODE. I am continuously getting the same error as not enough input arguments.

function dxdt = odefcn(t,x,a) %Function name
    dxdt = zeros(3,1);
    dxdt(1) = x(2);
    dxdt(2) = x(3);
    dxdt(3) =-a*x(3)+x(2)-x(1);
  end
0

There are 0 answers