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

采纳的回答

Walter Roberson
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 CenterFile Exchange 中查找有关 Symbolic Math Toolbox 的更多信息

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by