Algebraic Equation Solver with Unwanted Solutions
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Im trying to solve this 2 equations but I get an output with 4 diferents solutions when I need just 1 for each variable
m = 14.8; % mass of solar panel in Kg
t = 5; % time of deployment in seconds
Theta = 1.5708; % displacement of mechanism in radians
r = 0.909; % radius of the rotational trajectory
I = (1/3)*m*(r^2); % mass moment of inertia
Alpha = (2*Theta)/t^2;
T = Alpha*I; % torque
E = 207000000000; % N/m^2
Di = (0.007*1.1);
n = 0.25;
N = 4.25;
k = T/n;
syms Dm d
eqn1 = Dm == Di + d;
eqn2 = k == (d^4*E)/(10.8*N*Dm);
solution = solve([eqn1,eqn2] , [Dm,d]);
DmSol = double((solution.Dm))
dSol = double((solution.d))
Can someone explain me the error?
0 Kommentare
Antworten (1)
Walter Roberson
am 21 Mär. 2021
eqn2 = k == (d^4*E)/(10.8*N*Dm);
You have a polynomial in d^4. It is going to have 4 solutions.
You can filter out complex values by adding 'real', true option to solve(). But that will still give you an even number of solutions.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Symbolic Math Toolbox finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!