Using Matlab for solving symbolic equations
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi all,
Im trying to solve the following FEM equations for a cross pivot flexure mechanism in 2D. I'm just trying to get the same result for theta for verification, to later use MATLAB for other symbolic equations.
I have written the following code, which does only return an empty symbol.
close all;
clear all;
clc;
syms theta v_A v_B theta_A theta_B L S_A N_B M_A M_B M N_B S_B d E I N_A
Eq_1 = v_A == L*theta;
Eq_2 = theta_A == theta;
Eq_3 = v_B == L*theta/2;
Eq_4 = theta_B == theta/2;
Eq_5 = S_A == N_B;
Eq_6 = N_A == -S_B;
Eq_7 = M_A == -M_B + M - N_B*d*sin(theta) - S_B *d*cos(45);
Eq_8 = v_A == S_A*L^3/(3*E*I) + M_A*L^2/(2*E*I);
Eq_9 = theta_A == S_A*L^2/(2*E*I) + M_A*L/(E*I);
Eq_10 = v_B == S_B*L^3/(3*E*I) + M_B*L^2/(2*E*I);
Eq_11 = theta_B == S_B*L^2/(2*E*I) + M_B*L/(E*I);
eqns = [Eq_1 Eq_2 Eq_3 Eq_4 Eq_5 Eq_6 Eq_7 ...
Eq_8 Eq_9 Eq_10 Eq_11];
Y = solve(eqns,theta)
Does someone know how to fix this?
Thank you in advance.
Regards,
Wenzel
댓글 수: 0
채택된 답변
Walter Roberson
2021년 4월 14일
you have 11 equations in about 17 variables, and you ask to solve the equations in terms of one of the variables. When you are using equalities you need to solve for the same number of variables as you have equations, with the results being in terms of the remaining variables.
You never use E apart from I so you cannot separate the two. You should replace E*I with a single variable.
Reminder: 45 is a lot of radians .
추가 답변 (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!