matlab程序绘图.pptVIP

  • 3
  • 0
  • 约6.29千字
  • 约 22页
  • 2017-08-16 发布于河南
  • 举报
* Matlab绘图 我们主要讲 .m文件编程绘图 一、基本格式 function aaa plot(参数) 画图函数 function parabola x=-2:0.1:2; y=x.^2; plot(x,y) 二、基本设置 function parabola axis([-3,3,-1,5]) set(gcf,position,[0,0,1200,800]) set(gca,FontName,default,FontSize,30,FontWeight,bold) box on x=-2:0.1:2; y=x.^2; scatter(-3,4.7,5,w,d,filled) hold on scatter(-3,-0.5,5,w,d,filled) hold on scatter(3,4.7,5,w,d,filled) hold on scatter(3,-0.5,5,w,d,filled) hold on plot(x,y,‘-r’,‘linewidth’,1.5) 注意:在同一个图中画多次画图时应使用hold on语句,否则后面的会覆盖前面的 三、常用的画布、图、坐标轴、线条的设置 set(gca,‘LineWidth’,2.5) %设置坐标轴的粗细 set(gca,‘XMinorTick’,‘on’) %设置x轴最小刻度

文档评论(0)

1亿VIP精品文档

相关文档