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??
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponse acceptée
Image Analyst
le 22 Juil 2014
rowToDelete = 42; % or whatever....
yourMatrix(rowToDelete, :) = [];
5 commentaires
Triveni
le 9 Mar 2016
rowToDelete = [42 5 6 7]; % or whatever....
yourMatrix(rowToDelete, :) = [];
should also work...
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Matrix Indexing dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!