Quaternions with symbolic elements
15 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I'm trying to create quaternion number that contains symbolic elements but Matlab throws an error.
syms a
d=quaternion(1,2,3,a)
This is the error I get
All inputs to the quaternion constructor must be the same class (double or
single).
1 Kommentar
James Tursa
am 1 Feb. 2022
Bearbeitet: James Tursa
am 1 Feb. 2022
What do you intend to do with these symbolic quaternions downstream in your code? It would be pretty easy to write your own basic functions such as add, subtract, multiply, conjugate, inverse, etc. But if you intend to convert them to other forms such as direction cosine matrix or Euler angles then you will run into major difficulties.
Akzeptierte Antwort
Chris
am 1 Feb. 2022
The error says it all. It looks like symbolic variables aren't supported for quaternions. You might try a third-party toolbox:
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Coordinate Transformations finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!