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 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Allan N
el 22 de Jul. de 2014
Comentada: Triveni
el 9 de Mzo. de 2016
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 comentarios
Respuesta aceptada
Image Analyst
el 22 de Jul. de 2014
rowToDelete = 42; % or whatever....
yourMatrix(rowToDelete, :) = [];
5 comentarios
Triveni
el 9 de Mzo. de 2016
rowToDelete = [42 5 6 7]; % or whatever....
yourMatrix(rowToDelete, :) = [];
should also work...
Más respuestas (0)
Ver también
Categorías
Más información sobre Matrix Indexing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!