Algebraic Equation Solver with Unwanted Solutions

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?

답변 (1개)

Walter Roberson
Walter Roberson 2021년 3월 21일
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.

카테고리

도움말 센터File Exchange에서 Physics에 대해 자세히 알아보기

제품

태그

질문:

2021년 3월 21일

답변:

2021년 3월 21일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by