Delete row from Matrix
1,068 views (last 30 days)
More Answers (6)
Peter on 30 Nov 2012
"I have a Matrix of 400 rows and 40 columns.I want to completely remove rows 3 and 9 to get a matrix with 398 rows. How can I do it in MATLAB."
Matrix_2 = Matrix_1( [1:2,4:8,10:end] , : )
Dan W on 23 Jan 2015
I'm not sure if this is new syntax or not, but it works with R2012a and it's fast and simple.
x = rand(100);
x([3,9],:) = ;
toc; % Elapsed time is 0.000230 seconds.
Alireza Rezvani on 19 Jun 2016
sry, how i can Deleting individual columns of a matrix, any body know?
zshockz on 10 Oct 2016
So I have to make a function that is able to delete a row in a matrix [I have 3 by 3]. I am not sure how to do this, please leave any help you can!