Deleting rows with specific index
显示 更早的评论
Hi all, I want to delete rows with specific index number in my matrix and remove it from the matrix not assigning zero. For example I have a matrix with 400 row and I want to remove the rows with index =[ 6 13 16 25 30 86] What should I do? Thanks
回答(1 个)
per isakson
2012-3-31
Try
Matrix( [6 13 16 25 30 86], : ) = [];
and learn how to use the Matlab documentation
3 个评论
Jan
2012-4-1
@khatereh: You can ask Google for "matlab delete rows" also. The members of this forum like to solve problems, but if you can do this easily by your own, this would be more efficient.
Kaiyu Shi
2020-11-25
I googled matlab delete rows and it took me here.
Michael Harris
2022-10-13
Exactly what helped me drop multiple matrix rows at once ^^^
类别
在 帮助中心 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!