how plot these data?

4 views (last 30 days)
huda nawaf
huda nawaf on 2 Sep 2011
Answered: Voss on 28 Dec 2021
hi, I have array, where each row represent some data for each user. I can draw each row alone. but, I would to draw all rows of array in one figure to see the correlation between users.
when I use this command:
plot(x(1:5,1:100)) x:is array where I want get graph for five users for ex. each one has 100 values.
but, it seem to me the result is not right. how , I can get graph for number of users in one figure.
many thanks

Answers (1)

Voss
Voss on 28 Dec 2021
Calling plot() with a matrix plots one line per column of the matrix. Since each row of your matrix represents the data for one user, you can transpose the matrix in your call to plot() to do the right thing:
plot(x(1:5,1:100).')

Categories

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

Tags

Community Treasure Hunt

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

Start Hunting!