Info

This question is closed. Reopen it to edit or answer.

not enough input arguments??

1 view (last 30 days)
Jeason
Jeason on 18 Mar 2013
Closed: MATLAB Answer Bot on 20 Aug 2021
function dxdt = msd_ode(time,state, k, c)
x = state(1);<----- error
vx = state(2);
dxdt(1) = vx;
dxdt(2) = -k*x-c*vx;
dxdt = dxdt(:);
i have this error on line 2
how to solve it?? help
  3 Comments
Jan
Jan on 18 Mar 2013
@Azzi: dxdt = dxdt(:) reshapes dxdt to a column vector.
@Jeason: Please post the complete error message. Currentlöy we can only guess, if the title is a question, a part of the error message or an assumption.
Walter Roberson
Walter Roberson on 18 Mar 2013
We need to see your call to the ode routine.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!