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!