matlab解方程出现sym 20
MATLAB用以下代码解方程,解的结果为sym,不是具体的数值,请问原因在哪儿?程序:X_ws=57;h=161.8286;t=solve('(-2024.33+163....
MATLAB用以下代码解方程,解的结果为sym,不是具体的数值,请问原因在哪儿?
程序:
X_ws=57;
h=161.8286;
t=solve('(-2024.33+163.309*X_ws-4.88161*X_ws^2+6.302948*10^(-2)*X_ws^3-2.913705*10^(-4)*X_ws^4)+t*(18.2829-1.1691757*X_ws+3.248041*10^(-2)*X_ws^2-4.034184*10^(-4)*X_ws^3+1.8520569*10^(-6)*X_ws^4)+t^2*(-3.7008214*10^(-2)+2.8877666*10^(-3)*X_ws-8.1313015*10^(-5)*X_ws^2+9.9116628*10^(-7)*X_ws^3-4.4441207*10^(-9)*X_ws^4)-h=0','t') 展开
程序:
X_ws=57;
h=161.8286;
t=solve('(-2024.33+163.309*X_ws-4.88161*X_ws^2+6.302948*10^(-2)*X_ws^3-2.913705*10^(-4)*X_ws^4)+t*(18.2829-1.1691757*X_ws+3.248041*10^(-2)*X_ws^2-4.034184*10^(-4)*X_ws^3+1.8520569*10^(-6)*X_ws^4)+t^2*(-3.7008214*10^(-2)+2.8877666*10^(-3)*X_ws-8.1313015*10^(-5)*X_ws^2+9.9116628*10^(-7)*X_ws^3-4.4441207*10^(-9)*X_ws^4)-h=0','t') 展开
1个回答
2018-04-08 · 知道合伙人互联网行家
关注
展开全部
修改如下:
clear all; clc
E=2*10^5;
v=0.3;
G=E/(2*(1+v));
lambda=(v*E)/((1+v)*(1-2*v));
epsilon11=1.7833*10^-3;
epsilon22=1.6*10^-3;
syms sigma11 sigma22 epsilon33;
eq1= sigma11==2*G*epsilon11+lambda*(epsilon11+epsilon22+epsilon33);
eq2= sigma22==2*G*epsilon22+lambda*(epsilon11+epsilon22+epsilon33);
eq3= epsilon33==-v*(sigma11+sigma22)/E;
[sigma11,sigma22,epsilon33]=solve(eq1,eq2,eq3);
sigma11=vpa(sigma11,8);
sigma22=vpa(sigma22,8);
epsilon33=vpa(epsilon33,8);
val_sigma11 = double(sigma11)
val_sigma22 = double(sigma22)
val_epsilon33 = double(epsilon33)
matlab2013b下运行通过,版本太低了别怪别人。
val_sigma11 =
-0.0014
val_sigma22 =
497.4286
val_epsilon33 =
469.2286
clear all; clc
E=2*10^5;
v=0.3;
G=E/(2*(1+v));
lambda=(v*E)/((1+v)*(1-2*v));
epsilon11=1.7833*10^-3;
epsilon22=1.6*10^-3;
syms sigma11 sigma22 epsilon33;
eq1= sigma11==2*G*epsilon11+lambda*(epsilon11+epsilon22+epsilon33);
eq2= sigma22==2*G*epsilon22+lambda*(epsilon11+epsilon22+epsilon33);
eq3= epsilon33==-v*(sigma11+sigma22)/E;
[sigma11,sigma22,epsilon33]=solve(eq1,eq2,eq3);
sigma11=vpa(sigma11,8);
sigma22=vpa(sigma22,8);
epsilon33=vpa(epsilon33,8);
val_sigma11 = double(sigma11)
val_sigma22 = double(sigma22)
val_epsilon33 = double(epsilon33)
matlab2013b下运行通过,版本太低了别怪别人。
val_sigma11 =
-0.0014
val_sigma22 =
497.4286
val_epsilon33 =
469.2286
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询