如何用MATLAB画分段函数图像?谢谢!
2个回答
展开全部
举个例子
y=-exp(10.5*(x+0.5)) x<-0.5
y =exp(3.51*(x0.5))-2*exp(-3.51*(x+0.5)) (-0.5,0.5)
y=-exp(10.5*(x+0.5)) x>0.5
matlab
x=-1:0.02:1;
y=-exp(10.5*(x+0.5)).*( x<-0.5 )+...
(exp(3.51*(x+0.5))-2*exp(-3.51*(x+0.5))).*(x>-0.5&x<0.5)...
-exp(10.5*(x+0.5)).*(x>0.5);
plot(x,y)
semilogy(x,y)
y=-exp(10.5*(x+0.5)) x<-0.5
y =exp(3.51*(x0.5))-2*exp(-3.51*(x+0.5)) (-0.5,0.5)
y=-exp(10.5*(x+0.5)) x>0.5
matlab
x=-1:0.02:1;
y=-exp(10.5*(x+0.5)).*( x<-0.5 )+...
(exp(3.51*(x+0.5))-2*exp(-3.51*(x+0.5))).*(x>-0.5&x<0.5)...
-exp(10.5*(x+0.5)).*(x>0.5);
plot(x,y)
semilogy(x,y)
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询