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

Réponses (1)

per isakson
per isakson le 31 Mar 2012

3 votes

Try
Matrix( [6 13 16 25 30 86], : ) = [];
and learn how to use the Matlab documentation

3 commentaires

Jan
Jan le 1 Avr 2012
@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
Kaiyu Shi le 25 Nov 2020
I googled matlab delete rows and it took me here.
Michael Harris
Michael Harris le 13 Oct 2022
Exactly what helped me drop multiple matrix rows at once ^^^

Connectez-vous pour commenter.

Catégories

En savoir plus sur Linear Algebra dans Centre d'aide et File Exchange

Question posée :

le 31 Mar 2012

Commenté :

le 13 Oct 2022

Community Treasure Hunt

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

Start Hunting!

Translated by