Deleting specific Rows in a matrix
显示 更早的评论
Hi,
I have a matrix "A" that is 350x1 matrix, so it is a very large matrix. This matrix has about 40 rows that I want to remove. I know these rows and they are stored in another matrix "B", which is a 40x1 matrix. How do I delete the rows that are listed in matrix "B" from matrix "A"?
采纳的回答
更多回答(1 个)
Ondrej Budac
2014-4-7
If your matrix B has the row indices, it suffices to write
A(B) = [];
类别
在 帮助中心 和 File Exchange 中查找有关 Matrices and Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!