matlab三维图求解答c=0.785Vif=c*pi*sqrt(3)/8a=30b=solve('tan(a)=3*sqrt(2)*tan(b)')d=solve('tan(a)=6*tan(d)')Vsf=(1+3*cos(a)/cos(b))*c*sqrt(3)*pi/24Vcf=c*3*sqrt(3)*pi*cos(a)/(17*cos(d))for m=1:30for n=1:30if m/2==0 & n/2==0Vi=(2*(m-1)*(n-1)+2)/(2
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/29 19:33:10
matlab三维图求解答c=0.785Vif=c*pi*sqrt(3)/8a=30b=solve('tan(a)=3*sqrt(2)*tan(b)')d=solve('tan(a)=6*tan(d)')Vsf=(1+3*cos(a)/cos(b))*c*sqrt(3)*pi/24Vcf=c*3*sqrt(3)*pi*cos(a)/(17*cos(d))for m=1:30for n=1:30if m/2==0 & n/2==0Vi=(2*(m-1)*(n-1)+2)/(2
matlab三维图求解答
c=0.785
Vif=c*pi*sqrt(3)/8
a=30
b=solve('tan(a)=3*sqrt(2)*tan(b)')
d=solve('tan(a)=6*tan(d)')
Vsf=(1+3*cos(a)/cos(b))*c*sqrt(3)*pi/24
Vcf=c*3*sqrt(3)*pi*cos(a)/(17*cos(d))
for m=1:30
for n=1:30
if m/2==0 & n/2==0
Vi=(2*(m-1)*(n-1)+2)/(2*m*n+m+n)
Vs=3*(m+n-4)/(2*m*n+m+n)
Vc=8/(2*m*n+m+n)
Vf=Vi*Vif+Vs*Vsf+Vc*Vcf
else
Vi=2*(m-1)*(n-1)/(2*m*n+m+n)
Vs=3*(m+n-2)/(2*m*n+m+n)
Vc=4/(2*m*n+m+n)
Vf=Vi*Vif+Vs*Vsf+Vc*Vcf
end
end
end
我用这个求出所有M,n对应的Vf值之后,如何做出M,N,Vf之间的网格图
急用》.
matlab三维图求解答c=0.785Vif=c*pi*sqrt(3)/8a=30b=solve('tan(a)=3*sqrt(2)*tan(b)')d=solve('tan(a)=6*tan(d)')Vsf=(1+3*cos(a)/cos(b))*c*sqrt(3)*pi/24Vcf=c*3*sqrt(3)*pi*cos(a)/(17*cos(d))for m=1:30for n=1:30if m/2==0 & n/2==0Vi=(2*(m-1)*(n-1)+2)/(2
c=0.785;
Vif=c*pi*sqrt(3)/8;
a=30;
b=solve('tan(a)=3*sqrt(2)*tan(b)');
d=solve('tan(a)=6*tan(d)');
Vsf=(1+3*cos(a)/cos(b))*c*sqrt(3)*pi/24;
Vcf=c*3*sqrt(3)*pi*cos(a)/(17*cos(d));
VVVV=zeros(30,30); %欲先定义VVVV用于存储Vf
for m=1:30
for n=1:30
if m/2==0 && n/2==0; %你这里是想用mod的意思吗, m/2对m=1:30这不恒不等于零吗?matlab里面可没有int/int=int这一说.
Vi=(2*(m-1)*(n-1)+2)/(2*m*n+m+n);
Vs=3*(m+n-4)/(2*m*n+m+n);
Vc=8/(2*m*n+m+n);
Vf=Vi*Vif+Vs*Vsf+Vc*Vcf;
VVVV(m,n)=eval(Vf); %计算Vf的数值并赋给VVVV(m,n)
else
Vi=2*(m-1)*(n-1)/(2*m*n+m+n);
Vs=3*(m+n-2)/(2*m*n+m+n);
Vc=4/(2*m*n+m+n);
Vf=Vi*Vif+Vs*Vsf+Vc*Vcf;
VVVV(m,n)=eval(Vf); %计算Vf的数值并赋给VVVV(m,n)
end
end
end
[x y]=meshgrid(1:30,1:30); %生成X—Y网格基底
mesh(x,y,VVVV) %作图