How can I plot the data saved in a matrix?

6 vues (au cours des 30 derniers jours)
burgan
burgan le 27 Avr 2018
Commenté : burgan le 27 Avr 2018
I have a 104x24 matrix with data I want to plot in a single figure. However, I don't want to plot all the information of the matrix. I have saved the rows I will not use in a variable (row_no_used = [28 37 39 41 43 45 47 50 52 54 56 58 60];). How can I plot the rest of the rows with a simple script? To clarify a little bit more my point, I would like to plot the following rows: 1:27, 36, 38, 40, 42, 44, 46, 48, 49, 51, 53, 55, 57, 59, 61:96.
Many thanks for your help,

Réponse acceptée

KSSV
KSSV le 27 Avr 2018
A = rand(104,24) ;
row_no_used = [28 37 39 41 43 45 47 50 52 54 56 58 60];
[nx,ny] = size(A) ;
rows = 1:nx ;
row_used = setdiff(rows,row_no_used) ;
iwant = A(row_used,:) ;
plot(iwant)
  1 commentaire
burgan
burgan le 27 Avr 2018
Many thanks KSSV. Your solutions is very efficient.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Scatter Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by