码迷,mamicode.com
首页 > 其他好文 > 详细

绘制针状图

时间:2018-08-25 20:36:07      阅读:453      评论:0      收藏:0      [点我收藏+]

标签:com   lines   new   color   width   style   col   sel   plot   

t=[0:0.5:25];
y=exp(-t/3)+sin(1+2*t);
h=stem(t,y,‘--‘);
set(get(h,‘baseline‘),‘linestyle‘,‘:‘);   %把水平轴设置成: 的形状
set(h,‘markerfacecolor‘,‘yellow‘);
hold on 
t2=[0:0.1:25];
y2=exp(-t2/3)+sin(1+2*t2);
plot(t2,y2,‘r‘,‘linewidth‘,2);
box on;
set(gca,‘Ygrid‘,‘on‘)

  技术分享图片

绘制针状图

标签:com   lines   new   color   width   style   col   sel   plot   

原文地址:https://www.cnblogs.com/Airboy1/p/9535205.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!