matlab 区间是个函数形式,如何画出分段函数的三维曲面图 200
SigmaP=@(b)(382.6912.*(b+2)+57.6757.*(1+b))./(1.4487.*(2.*b+2)+1.2756.*(2-b));R=@(b)(...
SigmaP=@(b)(382.6912.*(b+2)+57.6757.*(1+b))./(1.4487.*(2.*b+2)+1.2756.*(2-b));
R=@(b)(1.2963./((382.6912.*(b+2)+57.6757.*(1+b))./(1.4487.*(2.*b+2)+1.2756.*(2-b))-100)).^(1/3);
Sigmare=@(b,r)100+(-100+((382.6912.*(b+2)+57.6757.*(1+b))./(1.4487.*(2.*b+2)+1.2756.*(2-b))))...
.*((1.2963./((382.6912.*(b+2)+57.6757.*(1+b))./(1.4487.*(2.*b+2)+1.2756.*(2-b))-100)).^(1/3)./r).^3;
Sigmarp=@(b,r)-115.3514.*(1+b)./(5.1025-2.8975.*(1+b))...
+(((1.2963./((382.6912.*(b+2)+57.6757.*(1+b))./(1.4487.*(2.*b+2)+1.2756.*(2-b))-100)).^(1/3)./r)...
.^((5.1025-2.8975.*(1+b))./(2.5512+1.2756.*b))).*((382.6912.*(b+2)+57.6757.*(1+b))./(1.4487.*(2.*b+2)+1.2756.*(2-b))+(115.3514.*(1+b)./(5.1025-2.8975.*(1+b))));
如上,Sigmar分两部分:Sigmare和Sigmarp,均是关于b和r的函数,b取值为0到1;对于Sigmare,r取值为R到1,对于Sigmarp,r取值是0到R。而R又是一个关于b的函数,所以我不知道怎么取分段函数。
最后需要画出Sigmar在b为0到1,r为0到1的三维曲线图 展开
R=@(b)(1.2963./((382.6912.*(b+2)+57.6757.*(1+b))./(1.4487.*(2.*b+2)+1.2756.*(2-b))-100)).^(1/3);
Sigmare=@(b,r)100+(-100+((382.6912.*(b+2)+57.6757.*(1+b))./(1.4487.*(2.*b+2)+1.2756.*(2-b))))...
.*((1.2963./((382.6912.*(b+2)+57.6757.*(1+b))./(1.4487.*(2.*b+2)+1.2756.*(2-b))-100)).^(1/3)./r).^3;
Sigmarp=@(b,r)-115.3514.*(1+b)./(5.1025-2.8975.*(1+b))...
+(((1.2963./((382.6912.*(b+2)+57.6757.*(1+b))./(1.4487.*(2.*b+2)+1.2756.*(2-b))-100)).^(1/3)./r)...
.^((5.1025-2.8975.*(1+b))./(2.5512+1.2756.*b))).*((382.6912.*(b+2)+57.6757.*(1+b))./(1.4487.*(2.*b+2)+1.2756.*(2-b))+(115.3514.*(1+b)./(5.1025-2.8975.*(1+b))));
如上,Sigmar分两部分:Sigmare和Sigmarp,均是关于b和r的函数,b取值为0到1;对于Sigmare,r取值为R到1,对于Sigmarp,r取值是0到R。而R又是一个关于b的函数,所以我不知道怎么取分段函数。
最后需要画出Sigmar在b为0到1,r为0到1的三维曲线图 展开
1个回答
展开全部
clear;
R=@(b)(1.2963./((382.6912.*(b+2)+57.6757.*(1+b))./(1.4487.*(2.*b+2)+1.2756.*(2-b))-100)).^(1/3);
Sigmare=@(b,r)100+(-100+((382.6912.*(b+2)+57.6757.*(1+b))./(1.4487.*(2.*b+2)+1.2756.*(2-b))))...
.*((1.2963./((382.6912.*(b+2)+57.6757.*(1+b))./(1.4487.*(2.*b+2)+1.2756.*(2-b))-100)).^(1/3)./r).^3;
Sigmarp=@(b,r)-115.3514.*(1+b)./(5.1025-2.8975.*(1+b))...
+(((1.2963./((382.6912.*(b+2)+57.6757.*(1+b))./(1.4487.*(2.*b+2)+1.2756.*(2-b))-100)).^(1/3)./r)...
.^((5.1025-2.8975.*(1+b))./(2.5512+1.2756.*b))).*((382.6912.*(b+2)+57.6757.*(1+b))./(1.4487.*(2.*b+2)+1.2756.*(2-b))+(115.3514.*(1+b)./(5.1025-2.8975.*(1+b))));
Sigmar=@(b,r)Sigmare(b,r).*(r>R(b))+Sigmarp(b,r).*(r<=R(b));
t=linspace(0,1);
[b,r]=meshgrid(t);
mesh(b,r,Sigmar(b,r));
hold on
plot3(t,R(t),Sigmar(t,R(t)),'w:','linewidth',3)
xlabel('b');ylabel('r');zlabel('Sigmar(b,r)');
SigmaP这个函数没用的吧
追问
先谢谢大神了,您说SigmaP这个函数没用,为什么?
还有,Sigmar=@(b,r)Sigmare(b,r).*(r>R(b))+Sigmarp(b,r).*(r<=R(b));这步怎么理解?
麻烦您啦,我比较笨
追答
你的原始问题里压根没提到SigmaP这个函数啊,也没看到哪里用了啊
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询