How to solve equations in variable terms?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
yehuda kristo
le 21 Avr 2023
Commenté : yehuda kristo
le 21 Avr 2023
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 commentaires
Réponse acceptée
Dyuman Joshi
le 21 Avr 2023
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])
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Partial Differential Equation Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!