Algebraic Equation Solver with Unwanted Solutions
Mostrar comentarios más antiguos
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?
Respuestas (1)
Walter Roberson
el 21 de Mzo. de 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.
Categorías
Más información sobre Mathematics en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!