How to delete multiple rows if multiple conditions hold true
2 views (last 30 days)
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 ?
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Environment and Settings 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!