How can i rearrange expressions?
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
採用された回答
DGM
2021 年 11 月 2 日
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 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Symbolic Math Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!