how plot these data?

4 visualizaciones (últimos 30 días)
huda nawaf
huda nawaf el 2 de Sept. de 2011
Respondida: Voss el 28 de Dic. de 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

Respuestas (1)

Voss
Voss el 28 de Dic. de 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).')

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by