例:
x = [0:0.01:2];
y = sinh(x);
z = cosh(x);
plot(x,y,‘r-o’,x,z,‘b-.’), xlabel(‘x’), ylabel(‘potential’), legend(‘sinh(x)’, ‘cosh(x)’), axis([0 2 -1 1]);
结果如图
matlab函数绘图及其功能显示
最新推荐文章于 2024-06-18 08:31:31 发布
例:
x = [0:0.01:2];
y = sinh(x);
z = cosh(x);
plot(x,y,‘r-o’,x,z,‘b-.’), xlabel(‘x’), ylabel(‘potential’), legend(‘sinh(x)’, ‘cosh(x)’), axis([0 2 -1 1]);
结果如图