For 2-D line plot

2 views (last 30 days)
Anurag
Anurag on 14 Mar 2014
Answered: Walter Roberson on 14 Mar 2014
For 2-D plot, command " plot(x,y)" gives us a graph of y vs x. but what is output of "plot(y).

Accepted Answer

Walter Roberson
Walter Roberson on 14 Mar 2014
If y is a vector, then plot(y) is the same as plot(1:length(y), y)
If y is a 2D matrix, then the assumed x is 1:size(y,1) and one line is created for each column of y.

More Answers (0)

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!