How to delete multiple rows if multiple conditions hold true
Show older comments
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 ?
Accepted Answer
More Answers (0)
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!