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 Center および File Exchange2-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