matlab 循环输出每次循环计算的结果
formatlongm=0.01forb=0.01:0.01:1forz=0.01:0.01:1F1=@(x)(1+z.^(-2)*x.^((2-2*m)/m)).^(0...
format long
m=0.01
for b=0.01:0.01:1
for z=0.01:0.01:1
F1=@(x)(1+z.^(-2)*x.^((2-2*m)/m)).^(0.5)
c=quad(F1,0,1)
F2=@(x)(1+z.^(-2)*x.^((2-2*m)/m)).^(-0.5)
e=quad(F2,0,1)
d=(((b*(1+m)).^2+((1+m)*4)./(m*z.^(-1)))./((b*(1+m)).^2+8*(1+m)./(m*z.^(-1))).^(0.5)-b*(1+m))*c-(((b*(1+m)).^2+8*(1+m)./(m*z.^(-1))).^0.5-b*(1+m))*e
if d<0
break
end
end
end
w=b+0.5*(-b*(1+m./50)+(b.^2*(1+m./50).^2+8*(1+m./50)*(z./50)./(m./50)).^0.5)*c 展开
m=0.01
for b=0.01:0.01:1
for z=0.01:0.01:1
F1=@(x)(1+z.^(-2)*x.^((2-2*m)/m)).^(0.5)
c=quad(F1,0,1)
F2=@(x)(1+z.^(-2)*x.^((2-2*m)/m)).^(-0.5)
e=quad(F2,0,1)
d=(((b*(1+m)).^2+((1+m)*4)./(m*z.^(-1)))./((b*(1+m)).^2+8*(1+m)./(m*z.^(-1))).^(0.5)-b*(1+m))*c-(((b*(1+m)).^2+8*(1+m)./(m*z.^(-1))).^0.5-b*(1+m))*e
if d<0
break
end
end
end
w=b+0.5*(-b*(1+m./50)+(b.^2*(1+m./50).^2+8*(1+m./50)*(z./50)./(m./50)).^0.5)*c 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询