Hi i have a rather simple question, I need to solve a system of ode's of the form Ax = b with given A and timespan and interval.
A = [-199 -198; 99 98]
To solve this i wrote the following code:
function dxdt = System()dxdt = zeros (2,2);dxdt(1) = -199*x(1) - 198*x(2);dxdt(2) = 99*x(1) + 98*x(2);dxdt = dxdt';end
And:
[t,x] = ode45(@System, [0 2.5], [1 1])plot(t,x)
The error that i get is:
Error using System
Too many input arguments
Does someone see where i went wrong?
Best Answer