How can i rearrange expressions?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I have 3 expressions D S L that depends on X Y Z a b
what function can i use to rearrange them to X Y Z that depends on D S L a b
i.e.
input:
D = -(X*cos(a)+Z*sin(a))*cos(b) - Y*sin(b);
S = (X*cos(a)+Z*sin(a))*sin(b) - Y*cos(b);
L = X*sin(a) - Z*cos(a);
output:
X = f(D,S,L,a,b)
Y = f(D,S,L,a,b)
Z = f(D,S,L,a,b)
0 Kommentare
Akzeptierte Antwort
DGM
am 2 Nov. 2021
Consider:
syms a b D S L X Y Z
e1 = D == -(X*cos(a)+Z*sin(a))*cos(b) - Y*sin(b);
e2 = S == (X*cos(a)+Z*sin(a))*sin(b) - Y*cos(b);
e3 = L == X*sin(a) - Z*cos(a);
S = solve([e1 e2 e3],[X Y Z]);
% observe results
S.X
S.Y
S.Z
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Symbolic Math Toolbox 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!