Clear Filters
Clear Filters

Deleting rows with specific index

94 views (last 30 days)
khatereh on 31 Mar 2012
Commented: Michael Harris on 13 Oct 2022
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

Answers (1)

per isakson
per isakson on 31 Mar 2012
Matrix( [6 13 16 25 30 86], : ) = [];
and learn how to use the Matlab documentation
Kaiyu Shi
Kaiyu Shi on 25 Nov 2020
I googled matlab delete rows and it took me here.
Michael Harris
Michael Harris on 13 Oct 2022
Exactly what helped me drop multiple matrix rows at once ^^^

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!