How to delete multiple rows if multiple conditions hold true
Afficher commentaires plus anciens
I am trying to delete rows from a matrix, named CDF_stand_init, if they contain any column value >3 or <-3 I am trying this
c1 = CDF_stand_init (:,:) >3
c2 = CDF_stand_init (:,:) < -3
C = c1 | c2
CDF_stand_init(C,:) = []
but it produces the following error: Index of element to remove exceeds matrix dimensions at
CDF_stand_init(C,:) = []
how can I resolve it ?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Matrix Indexing dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!