Solving equations of static equilibrium for all angles
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have a system of equations representing equations of equilibirum. I am trying to solve for all values of an input which satisfy that the result of three equations are simultaneously zero. I have three additional variables which I defined in terms of only alpha (the thing I need to solve). Which method is recommended to solve: loop, solve function, or symbolic tool box? Thank you for your feedback
Defining alpa where start is 270 degrees and converting to radians
deg2rad = pi / 180 ;
alpha = (270:1:630)*deg2rad ;
Variables in terms of things I need to solve for
a_y = 500*cos(alpha) + 600*sin(alpha);
c_x = 300*sin(alpha);
c_y = 800*cos(alpha) - 600*sin(alpha);
Equations that state the necessary conditions for alpha to satisfy
f_x = c_x + 300*sin(alpha) == 0;
f_y = -a_y + c_y - 300*cos(alpha) == 0;
m_c = 0.150*a_y + -75*cos(alpha) + -90*sin(alpha) == 0;
0 commentaires
Réponses (1)
SAI SRUJAN
le 12 Oct 2023
Hi Maggie Forest,
I understand that you are trying to figure out an appropriate method to use for obtaining solutions within a specific range by using loops or the “solve” function in MATLAB.
One approach is to employ loops, which involves checking at specific intervals within the range [l, r]. Alternatively, the "solve" function in MATLAB provides the advantage of obtaining solutions within a continuous interval between [l, r].
You can follow the below given example to resolve the issue.
syms z
deg2rad = pi / 180 ;
alpha = (270:1:630)*deg2rad ;
a_y = 500*cos(z) + 600*sin(z);
c_x = 300*sin(z);
c_y = 800*cos(z) - 600*sin(z);
f_x = c_x + 300*sin(z) == 0;
f_y = -a_y + c_y - 300*cos(z) == 0;
m_c = 0.150*a_y + -75*cos(z) + -90*sin(z) == 0;
%mention constraints
symanswer=solve([f_x f_y m_c z>=alpha(1) z<=alpha(end)],z)
You can refer to the below documentation to understand more about “solve” in MATLAB
0 commentaires
Voir également
Catégories
En savoir plus sur Symbolic Math 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!