MATLAB: Deleting a Column from an array arraycolumndeleterow I am given a 21 x 345 array. I need to delete JUST column 190. How would I do so and keep all the rest the same so that it is a 21 x 344 array Best Answer If ‘M’ is your matrix, just set the entire column to the empty array []:M(:,190) = []; Related SolutionsMATLAB: How to eliminate rows with NaN elements rows = any(isnan(myMatrix),2);myMatrix(rows,:) = []; MATLAB: Delete rows from matrix Just use some basic MATLAB logical indexing:>> X = M(M(:,1)~=0,:)X = 1 1 2 6 3 5 5 55 6 56 7 69 11 2 Related Question3 dimension arrayDeleting rows from arrayHow to populate a cell array
Best Answer