matlab图保存及图例的设置和函数.docVIP

  • 18
  • 0
  • 约9.28千字
  • 约 6页
  • 2016-10-06 发布于贵州
  • 举报
matlab图保存及图例的设置和函数

图形的保存的步骤:figure——edit——copy figure 例1:x=[0,0.48,0.84,1,0.91,0.6,0.14]; subplot(2,2,1) plot(x) hold on subplot(2,2,2) plot(x,*) subplot(2,2,3) plot(x,-b*) subplot(2,2,4) plot(x,-k*) x=0:0.01:2*pi; y1=sin(x); y2=cos(x); plot(x,y1,b,x,y2,r) legend(正弦曲线,余弦曲线) title(正弦与余弦曲线) xlabel(x) ylabel(y) x=-5:5 x = Columns 1 through 9 -5 -4 -3 -2 -1 0 1 2 3 Columns 10 through 11 4 5 y=x y = Columns 1 through 9 -5 -4 -3 -2 -1 0 1 2 3 Columns 10 through 11 4 5 [X,Y]=meshgrid(x,y) X = Columns 1 through 9 -5 -4 -3 -2 -1 0 1 2 3 -5 -4 -3 -2 -1 0 1 2 3 -5 -4 -3 -2 -1 0 1 2 3 -5 -4 -3 -2 -1 0 1 2 3 -5 -4 -3 -2 -1 0 1 2 3 -5 -4 -3 -2 -1 0 1 2 3 -5 -4 -3 -2 -1 0 1 2 3 -5 -4 -3 -2 -1 0 1 2 3 -5 -4 -3 -2 -1 0 1 2 3 -5 -4 -3 -2 -1 0 1 2 3 -5 -4 -3 -2 -1 0 1 2 3 Columns 10 through 11 4 5 4 5 4 5 4 5 4 5 4 5 4 5 4 5 4 5 4 5 4 5 Y = Columns 1 through 9 -5 -5 -5 -5 -5 -5 -5 -5 -5 -4 -4 -4 -4 -4 -4 -4 -4 -4 -3 -3 -3 -3 -3 -3 -3 -3 -3 -2 -2 -2 -2 -2 -2 -2 -2 -2 -1 -1 -1 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档