%% 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

 채택된 답변

Star Strider
Star Strider 2022년 4월 17일

1 개 추천

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);
S = struct with fields:
A: (1511157274518286468382720*(2525139333831674350099986009185250206368550689820477775499277674242237931066555052851200000*Mxy + 14978046062318810718950739371470519539853358944686543437555228931685540328897460944712499200000000*Qx - 22284748388481… B: (42535295865117307932921825928971026432*(73680728475320241462839948936895258395643221076945313747333676322247465028812800000*Qx - 39150960164355549520141067478690196535862474302259608824270739256313334994836925*pi*Qx + 3355062614714504164538684… C: -(2283596308329535809693257551119192218212394598400*pi*(968836245234758528816644797919619394171374788137247490470379192066206931473137664*Mx - 87825825062379193201793184198736871618566259588574297335278109*Mxy + 93772165783889616735951215746508…
A = vpa(S.A, 5)
A = 
B = vpa(S.B, 5)
B = 
C = vpa(S.C, 5)
C = 
.

댓글 수: 2

Mark
Mark 2022년 4월 18일
Thanks you very much! Star Strider
Star Strider
Star Strider 2022년 4월 18일
As always, my pleasure!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Automotive에 대해 자세히 알아보기

제품

릴리스

R2022a

태그

질문:

2022년 4월 17일

댓글:

2022년 4월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by