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??
    7 views (last 30 days)
  
       Show older comments
    
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 Comments
Accepted Answer
  Image Analyst
      
      
 on 22 Jul 2014
        rowToDelete = 42; % or whatever....
yourMatrix(rowToDelete, :) = [];
5 Comments
  Triveni
      
 on 9 Mar 2016
				 rowToDelete = [42 5 6 7]; % or whatever....
yourMatrix(rowToDelete, :) = [];
should also work...
More Answers (0)
See Also
Categories
				Find more on Matrix Indexing in Help Center and File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


