How can I delete an entire row in a matrix and shift the rest of the matrix below the deleted row up each time I delete??
6 ビュー (過去 30 日間)
古いコメントを表示
I want to delete an entire row and shift the remaining matrix below the deleted row up by one, each time I delete a row.
0 件のコメント
採用された回答
Image Analyst
2014 年 7 月 22 日
rowToDelete = 42; % or whatever....
yourMatrix(rowToDelete, :) = [];
5 件のコメント
Triveni
2016 年 3 月 9 日
rowToDelete = [42 5 6 7]; % or whatever....
yourMatrix(rowToDelete, :) = [];
should also work...
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Matrix Indexing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!