ode45 expects a function f(t,y) which takes two arguments and for which the second argument is a vector. Also, the output must be a column vector. Thus the following works: f=inline('[v(2); v(3); -v(3)-v(2)-v(1)]','t','v') In this case the call to ode45 looks like [t,y]=ode45(f, .... However, I think it is just as easy to write an m-file: function dy=myf(t,y); dy=zeros(3,1); % makes it a column dy(1)=y(2); dy(2)=y(3); dy(3)=-y(3)-y(2)-y(1); Here, the call to ode45 looks like [t,y]=ode45(@myf, .... Note the use of the "@" symbol to create a function handle. The inline form doesn't need it.