plot in matlab
- جمعه, ۱۴ آبان ۱۳۹۵، ۱۰:۴۵ ب.ظ
توضیحات Plot در متلب .
Syntax
Description
plot( creates a 2-D line plot of the data in X,Y)Y versus the corresponding values in X.
-
If
XandYare both vectors, then they must have equal length. Theplotfunction plotsYversusX. -
If
XandYare both matrices, then they must have equal size. Theplotfunction plots columns ofYversus columns ofX. -
If one of
XorYis a vector and the other is a matrix, then the matrix must have dimensions such that one of its dimensions equals the vector length. If the number of matrix rows equals the vector length, then theplotfunction plots each matrix column versus the vector. If the number of matrix columns equals the vector length, then the function plots each matrix row versus the vector. If the matrix is square, then the function plots each column versus the vector. -
If one of
XorYis a scalar and the other is either a scalar or a vector, then theplotfunction plots discrete points. However, to see the points you must specify a marker symbol, for example,plot(X,Y,'o').
plot( plots multiple X1,Y1,...,Xn,Yn)X, Y pairs using the same axes for all lines.
plot( sets the line style, marker type, and color for each line. You can mix X1,Y1,LineSpec1,...,Xn,Yn,LineSpecn)X, Y, LineSpec triplets with X, Y pairs. For example, plot(X1,Y1,X2,Y2,LineSpec2,X3,Y3).
plot( creates a 2-D line plot of the data in Y)Y versus the index of each value.
-
If
Yis a vector, then the x-axis scale ranges from 1 tolength(Y). -
If
Yis a matrix, then theplotfunction plots the columns ofYversus their row number. The x-axis scale ranges from 1 to the number of rows inY. -
If
Yis complex, then theplotfunction plots the imaginary part ofYversus the real part ofY, such thatplot(Y)is equivalent toplot(real(Y),imag(Y)).
plot(___, specifies line properties using one or more Name,Value)Name,Value pair arguments. For a list of properties, see Chart Line Properties. Use this option with any of the input argument combinations in the previous syntaxes. Name,Value pair settings apply to all the lines plotted.
returns a column vector of chart line objects. Use h = plot(___)h to modify properties of a specific chart line after it is created. For a list of properties, see Chart Line Properties.
Examples
Input Arguments
Output Arguments
More About
- ۹۵/۰۸/۱۴



















