MATLAB讲义 (北京师范大学)第二章 (2学时) MATLAB的图形功能.pdfVIP

  • 5
  • 0
  • 约6.06千字
  • 约 16页
  • 2017-11-13 发布于浙江
  • 举报

MATLAB讲义 (北京师范大学)第二章 (2学时) MATLAB的图形功能.pdf

§3.1 Using Basic Plotting Functions I (2-dimension) Ⅰ. Creating a Plot 1. plot(X,Y): 2. plot(Y): 3. plot(X, Y, s): s: colors\ line styles\markers 4. plot(X1,Y1,s1,X2,Y2,s2,X3,Y3,s3,……) If no color is specified, makes automatic use of the colors specified by the axes ColorOrder property. Ⅱ、special plot of 2-dimension 1 1. Semi-log scale plot : 0.8 semilogx 0.6 semilogy 0.4 0.2 loglog is the same as plot 0 -0.2 -0.4 -0.6 x=1:0.1*pi:2*pi; -0.8 -1 y=sin(x); 100 semilogx(x,y,-*) 2、Polar coordinate plot polar(theta, rho) polar(theta, rho, s): Theta, the angle, in radians, versus the radius RHO x=1:0.1*pi:4*pi; y=sin(x/2)+x; polar(x,y,-) 3 、Graphs with y tick labels on the left and right plotyy(X1,Y1,X2,Y2) plotyy(X1,Y1,X2,Y2,fun):fun is plotting function , e.g. plot, semiplot, loglog plotyy(X1,Y1,X2,Y2,fun1,fun2):Fun1(X1,Y1) Fun2(X2,Y2) Ⅲ、displaying multiple plots in one figure subplot (m, n, p) or subplot (m n p) Partitions the figure window into an m-by-n matrix of small subplots and selects the pth subplot for the current plot. §3.2 Using Basic Plotting Functions I (3-dimension) Ⅰ、plot lines and points in 3-Dspace plot3(x,y,z): x, y, z are three vectors of the same length plot3(X,Y,Z): X, Y and Z are thre

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档