Use matrix index number as parameter for x-axis.

14 views (last 30 days)
So I have to plot the following set of data: y=[12,14,12,22,8,9]
And allow MATLAB to use the matrix index number as the parameter for the x-axis.
I'm not sure how to do this. Any help would be appreciated.
Thanks

Accepted Answer

Azzi Abdelmalek
Azzi Abdelmalek on 8 Jun 2014
y=[12,14,12,22,8,9]
plot(y)
  1 Comment
Timothy Bell
Timothy Bell on 8 Jun 2014
Thanks, for some reason I was expecting something more difficult. Thanks again!

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!