I have tried to solve a set of equations of motion in Mathematica and got an error. Then, I simplified it as much as possible, and the following example gives the same error.

<< Quaternions`

NDSolve[{y'[x] == y[x], y[0] == Quaternion[1, 0, 0, 0]}, y, {x, 0, 1}]

The error is:

NDSolve::ndinnt: "Initial condition Quaternion[1.,0.,0.,0.] is not a number or a rectangular array of numbers."

So if I get it right, all beauty of rotation using quaternions (I actually had to use only a few equations for a complex problem) is lost when working in Mathematica? The documentation is silent on this point, it doesn't say "you can't solve equations in quaternions" (it would sound horrible).

Is resorting to hand-made quaternion imitation the only way to go?

Mathematica 8 and 9.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.