Matlab error message, help please

  • Thread starter Thread starter Daniel1992
  • Start date Start date
  • Tags Tags
    Error Matlab
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
3 replies · 2K views
Daniel1992
Messages
21
Reaction score
0
I get this error message

Subscript indices must either be real positive integers or logicals.

Error in doubleODE (line 14)
dYdt(2) = l1*(m1 + m2)*Y(4) - l2*m2*Y(3)*cos(Y(1) - Y(2))/...

I am having trouble working out what is causing the problem. Any advice?

Thanks
 
Physics news on Phys.org
I found the error. Turns out I missed a * when multiplying :-|