matlab解方程组,答案是sym没有具体数值clear allclcE=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=sym('sigma11=2*G*epsilon11+lambda*(epsilon11+epsilon2
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/24 01:41:16
matlab解方程组,答案是sym没有具体数值clear allclcE=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=sym('sigma11=2*G*epsilon11+lambda*(epsilon11+epsilon2
matlab解方程组,答案是sym没有具体数值
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=sym('sigma11=2*G*epsilon11+lambda*(epsilon11+epsilon22+epsilon33)');
eq2=sym('sigma22=2*G*epsilon22+lambda*(epsilon11+epsilon22+epsilon33)');
eq3=sym('epsilon33=-v*(sigma11+sigma22)/E');
[sigma11,sigma22,epsilon33]=solve(eq1,eq2,eq3);
sigma11=vpa(sigma11,8);
sigma22=vpa(sigma22,8);
epsilon33=vpa(epsilon33,8);
程序如上,需要的答案sigma11,sigma22,epsilon33都是1x1 sys类型,没有具体数字,请问怎么解决?
matlab解方程组,答案是sym没有具体数值clear allclcE=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=sym('sigma11=2*G*epsilon11+lambda*(epsilon11+epsilon2
修改如下:
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
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;
epsilon33=-2*v*(G+lambda)*(sigma11+sigma...
全部展开
解方程组失效,可将程序改为:
clear
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;
epsilon33=-2*v*(G+lambda)*(sigma11+sigma22)/(2*v+E)
sigma11=2*G*epsilon11+lambda*(epsilon11+epsilon22+epsilon33)
sigma22=2*G*epsilon22+lambda*(epsilon11+epsilon22+epsilon33)
最后运行结果是:
>> epsilon33=-2*v*(G+lambda)*(epsilon11+epsilon22)/(2*v+E)
epsilon33 =
-0.0020
>> sigma11=2*G*epsilon11+lambda*(epsilon11+epsilon22+epsilon33)
sigma11 =
439.5156
>> sigma22=2*G*epsilon22+lambda*(epsilon11+epsilon22+epsilon33)
sigma22 =
411.3156
收起
4+645+6+4665+4++5+456445+45