MATLAB: Does ode45 say that I don’t have enough input arguments

coupled differential equationsnot enough argumentsode45output

Here is my code:
function dx = HW5_Prob6(t,x)
dx=zeros(2,1);
dx(1)=exp(-x(1))-x(2)*t;
dx(2)=x(1)*t+cos(x(1)+y(1));
[t,x]=ode45(@HW5_Prob6,[1,5],[10,2]);
plot(t,x)
The error message: HW5_Prob6 Not enough input arguments.
Error in HW5_Prob6 (line 3) dx(1)=exp(-x(1))-x(2)*t;

Best Answer

[t,x]=ode45(@HW5_Prob6,[1,5],[10,2]);
plot(t,x)
And the function is:
function dx = HW5_Prob6(t,x)
dx=zeros(2,1);
dx(1)=exp(-x(1))-x(2)*t;
dx(2)=x(1)*t+cos(x(1)+x(1));
end