Solving simultaneous equations to give me forces at certain loads
조회 수: 10 (최근 30일)
이전 댓글 표시
I want to solve these simultaneous equations in a way that allows me to get the values of F (force) at any load applied (w); I want to be able to type in any load and the code gives me the forces F. The angle theta is 45 degrees. To illustrate this, I am building a cardboard bridge and I am trying to find the amount of load I can apply before any truss or member of that bridge fails. The force on the members is F and the load is w (the bridge has a certain breaking load that I am yet to determine but shouldn't be an issue in this code). How can I do this? I tried using syms but I did not get anywhere. Appreciate the help
댓글 수: 1
Star Strider
2023년 3월 1일
They appear to be linear (unless you are solving for θ), so it should be straightforward.
답변 (1개)
Shushant
2023년 3월 14일
According to my understanding, you are facing difficulty solving your set of simultaneous equation. You can use "syms" to solve the set of equations. Check out this documentation to get a deeper understanding on solving system of equations using "syms" Solve System of Linear Equations - MATLAB & Simulink (mathworks.com).
Here is a sample code on how you can use "syms" to solve your set of equations. I have made some random equation and solved them using "solve" function. Hope this gives you a better understanding.
syms F [2,1];
syms Rx [1,1];
theta = pi/4;
x(1) = F1*cos(theta)+F2+Rx1==0;
y(1) = F1*sin(theta)+Rx1==0;
x(2) = -F1*cos(theta)+F2*cos(theta)==0;
y(2) = -F1*sin(theta)+Rx1-F2*sin(theta)==0;
sol = solve([x(1:end), y(1:end)], [F1, F2, Rx1])
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!