solve unknown constants A, B and C
조회 수: 5 (최근 30일)
이전 댓글 표시
%% I try to calculate the three unknown constants A,B, and C based on the 1, 2, and 3 equation that I marked by pencil
%% But There is an error message indicates that "Unrecognized function or variable 'Mxy'"
%% How can I solve the three equations, if there is any suggestion, please feel free to let me know!
%% Thank you very much!!
clc
clear
syms A B C
n=3;
y=1;
a=600;
h=15;
v=0.3;
beta=sqrt((n^2*pi^2/(a^2))+(10/h^2));
eqns=[Mxy==-A*(1-v)+B*(1-v+(2/5)*(n^2*pi^2*h^2)/(a^2))+C*((a^2/(n^2*pi^2))+(h^2/5))*(n^2*pi^2/a^2)*cos(n*pi*y/a),Mx==(-A*(1-v)+2*B*(1+((n^2*pi^2*h^2)/(5*a^2)))+((C*beta*a*h^2)/(5*n*pi)))*(n^2*pi^2/a^2)*sin(n*pi*y),...
Qx==-(2*B*(n*pi/a)^3+C*(n*pi/a))*sin(n*pi*y/a)];
S=solve(eqns,A,B,C)
A=S.A
B=S.B
C=S.C
댓글 수: 0
채택된 답변
Star Strider
2022년 4월 17일
Define ‘Mxy‘, ‘Mx’, and ‘Qx’ in the syms declaration if no values ared defined for them.
%% I try to calculate the three unknown constants A,B, and C based on the 1, 2, and 3 equation that I marked by pencil
%% But There is an error message indicates that "Unrecognized function or variable 'Mxy'"
%% How can I solve the three equations, if there is any suggestion, please feel free to let me know!
%% Thank you very much!!
% clc
% clear
syms A B C Mxy Mx Qx
n=3;
y=1;
a=600;
h=15;
v=0.3;
beta=sqrt((n^2*pi^2/(a^2))+(10/h^2));
eqns=[Mxy==-A*(1-v)+B*(1-v+(2/5)*(n^2*pi^2*h^2)/(a^2))+C*((a^2/(n^2*pi^2))+(h^2/5))*(n^2*pi^2/a^2)*cos(n*pi*y/a),Mx==(-A*(1-v)+2*B*(1+((n^2*pi^2*h^2)/(5*a^2)))+((C*beta*a*h^2)/(5*n*pi)))*(n^2*pi^2/a^2)*sin(n*pi*y),...
Qx==-(2*B*(n*pi/a)^3+C*(n*pi/a))*sin(n*pi*y/a)];
S = solve(eqns,A,B,C);
A = vpa(S.A, 5)
B = vpa(S.B, 5)
C = vpa(S.C, 5)
.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Mathematics and Optimization에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!