How to solve equations in variable terms?
4 次查看(过去 30 天)
显示 更早的评论
I wanted to find equation solving a, b, c, and d in terms of e, f, g, and h. Is it possible to do this in MATLAB? Here's my code for the moment.
clc
clear all
syms a b c d e f g h alpha
A = [a b; c d];
R = [cos(alpha) -sin(alpha); sin(alpha) cos(alpha)];
D = (R*A)*transpose(R);
e=D(1,1)
f=D(1,2)
g=D(2,1)
h=D(2,2)
eqn=[e f g h];
solver=solve(eqn,[a b c d])
0 个评论
采纳的回答
Dyuman Joshi
2023-4-21
syms a b c d e f g h alpha
A = [a b; c d];
R = [cos(alpha) -sin(alpha); sin(alpha) cos(alpha)];
D = (R*A)*transpose(R);
%Modify the equations
eq1 = e-D(1,1)==0;
eq2 = f-D(1,2)==0;
eq3 = g-D(2,1)==0;
eq4 = h-D(2,2)==0;
eqn=[eq1 eq2 eq3 eq4];
solver=solve(eqn,[a b c d])
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Particle & Nuclear Physics 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!