I have this MATLAB code to solve system of ordinary differential equations but I got the error "Not enough input arguments."
function xprime=lorenz(t,x);
sig=10;
beta=8/3;
rho=28;
xprime=[-sig*x(1)+sig*x(2);rho*x(1)-x(2)-x(1)*x(3);-beta*x(3)+x(1)*x(2)];
end
I will be glad to get help
Most likely culprit would be you are calling your function wrongly.
Calling
should work.
Calling
would give similar error that you obtained earlier as the function signature require $2$ input arguments.
Remark: $t$ is not used in your code.