how plot these data?

4 次查看(过去 30 天)
huda nawaf
huda nawaf 2011-9-2
回答: Voss 2021-12-28
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

回答(1 个)

Voss
Voss 2021-12-28
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).')

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by