分类: 项目管理
2011-06-21 17:46:36
hold on 是当前轴及图形保持而不被刷新,准备接受此后将绘制
hold off 使当前轴及图形不在具备被刷新的性质
>>
t=(0:pi/100:pi)';
y1=sin(t)*[1,-1];
y2=sin(t).*sin(9*t);
t3=pi*(0:9)/9;
y3=sin(t3).*sin(9*t3);
plot(t,y1,'r:',t,y2,'-bo')
hold
on
plot(t3,y3,'s','MarkerSize',10,'MarkerEdgeColor',[0,1,0],'MarkerFaceColor',[1,0.8,0])
axis([0,pi,-1,1])
hold off
图形
>>
t=(0:pi/100:pi)';
y1=sin(t)*[1,-1];
y2=sin(t).*sin(9*t);
t3=pi*(0:9)/9;
y3=sin(t3).*sin(9*t3);
plot(t,y1,'r:',t,y2,'-bo')
plot(t3,y3,'s','MarkerSize',10,'MarkerEdgeColor',[0,1,0],'MarkerFaceColor',[1,0.8,0])
axis([0,pi,-1,1])
hold off
去掉hold on后的图形,只显示最后的一次数据
来自: http://hi.baidu.com/lotai85/blog/item/6b8b114b1a59e02908f7efd6.html