Use matrix index number as parameter for x-axis.

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

y=[12,14,12,22,8,9]
plot(y)

1 Comment

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!