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
X
andY
are both vectors, then they must have equal length. Theplot
function plotsY
versusX
. -
If
X
andY
are both matrices, then they must have equal size. Theplot
function plots columns ofY
versus columns ofX
. -
If one of
X
orY
is 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 theplot
function 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
X
orY
is a scalar and the other is either a scalar or a vector, then theplot
function 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
Y
is a vector, then the x-axis scale ranges from 1 tolength(Y)
. -
If
Y
is a matrix, then theplot
function plots the columns ofY
versus their row number. The x-axis scale ranges from 1 to the number of rows inY
. -
If
Y
is complex, then theplot
function plots the imaginary part ofY
versus 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
- ۹۵/۰۸/۱۴