MATLAB: How to use function and ode45

homeworkmatlab functionno attemptode45

hello friends,
can you help me to write that in matlab? they ask "write this equations in matlab function" for the first quastion …..the second quastion is to call the function and use ode45
when q=1 m1=2 m2=2 R1=1 R2=2 g=9.82 b=0.001
thank you

Best Answer

i got a complex numbers! [...] .the question is why!?
  • You're taking the root of a negative number ,
  • Or you're calculating the arcsin or arccos of a number outside [-1 1],
  • Or you're doing any other mathematical operation that can result in complex numbers
Reread the formulae that you wrote. In particular, note that x^.2 is . Perhaps you meant x.^2
Related Question