Matlab filter columns of array based on value in row
Show older comments
I have a 3 x 3000 array with x, y, z as the rows.
I want a new array from filtering the above if z == 3.
I tried
```
task3_xy = xy_arr(~ismember(xy_arr(3, :), [3]),:);
```
but it's telling me
The logical indices in position 1 contain a true value outside of
the array bounds.
How else can I do this?
Accepted Answer
More Answers (1)
Nobutaka Kim
on 7 Feb 2022
0 votes
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!