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
per isakson 2012 年 3 月 31 日

3 投票

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

3 件のコメント

Jan
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
Kaiyu Shi 2020 年 11 月 25 日
I googled matlab delete rows and it took me here.
Michael Harris
Michael Harris 2022 年 10 月 13 日
Exactly what helped me drop multiple matrix rows at once ^^^

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeMatrix Indexing についてさらに検索

質問済み:

2012 年 3 月 31 日

コメント済み:

2022 年 10 月 13 日

Community Treasure Hunt

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

Start Hunting!

Translated by