How to delete columns of a matrix containing specific values in bottom row
古いコメントを表示
Hi. I am working on a program that generates a 2xN matrix that looks something like this
ModRows = [7 11 21 27 243 2817 3114 3489;...
2 2 4 6 13 279 1 150]
What I want to do is search the matrix for values in the second row that are below 2 and delete the respective column, so I would get something like this, for example:
ModRows = [21 27 243 2817 3489;...
4 6 13 279 150;]
I have no idea where to start. I can't use an index i from 1 to the size of ModRows, because whenever I delete a column, ModRows becomes shorter, resulting in an error.
Any help would be much appreciated!
Marc
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Operators and Elementary Operations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!