一下matlab程序错在哪clear allclclamada=0.3;theta=0.7;m=0.4;d=0:0.01:1;r=0:0.01:1;[d,r]=meshgrid(d,r);c=(1-theta+m*(d.^2-r.^2)/2+lamada*(r-d))/2;A2=m.^2*r.^4/(32*(1-theta))+m.^2*d.^4/(32*(1-theta))-m.^2*d.^2*r.^2/(16*(1-theta))-(3-2*theta)*m*la
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/19 20:07:21
一下matlab程序错在哪clear allclclamada=0.3;theta=0.7;m=0.4;d=0:0.01:1;r=0:0.01:1;[d,r]=meshgrid(d,r);c=(1-theta+m*(d.^2-r.^2)/2+lamada*(r-d))/2;A2=m.^2*r.^4/(32*(1-theta))+m.^2*d.^4/(32*(1-theta))-m.^2*d.^2*r.^2/(16*(1-theta))-(3-2*theta)*m*la
一下matlab程序错在哪
clear all
clc
lamada=0.3;
theta=0.7;
m=0.4;
d=0:0.01:1;
r=0:0.01:1;
[d,r]=meshgrid(d,r);
c=(1-theta+m*(d.^2-r.^2)/2+lamada*(r-d))/2;
A2=m.^2*r.^4/(32*(1-theta))+m.^2*d.^4/(32*(1-theta))-m.^2*d.^2*r.^2/(16*(1-theta))-(3-2*theta)*m*lamada*r.^3/(16*(1-theta));
B2=-(3-2*theta)*m*lamada*d.^3/(16*(1-theta)+(3-2*theta)*m*lamada*r.^2*d/(16*(1-theta))+(3-2*theta)*m*lamada*d.^2*r/(16*(1-theta));
C2=(lamada.^2/4-m/8)*r.^2+(-3*m/8+lamada.^2/4+c/(2*theta))*d.^2-lamada.^2*d*r/2+(3-2*theta)*lamada*r/8;
D2=(lamada*c/theta-(3-2*theta)*lamada/8)*d-c.^2/theta+c+(1-theta)/8;
f=(1/2)*(A2+B2+C2+D2);
mesh(d,r,f)
一下matlab程序错在哪clear allclclamada=0.3;theta=0.7;m=0.4;d=0:0.01:1;r=0:0.01:1;[d,r]=meshgrid(d,r);c=(1-theta+m*(d.^2-r.^2)/2+lamada*(r-d))/2;A2=m.^2*r.^4/(32*(1-theta))+m.^2*d.^4/(32*(1-theta))-m.^2*d.^2*r.^2/(16*(1-theta))-(3-2*theta)*m*la
B2 那句少个括号.-(3-2*theta)*m*lamada*d.^3/(16*(1-theta)此处少.加上就对了.