How to solve equations in variable terms?
조회 수: 3 (최근 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!