MATLAB: How to remove an entire row of zeros in a matrix delete rowmatrixzeros If I have a matrix like this one: 45 23 54 0 0 0 9 3 32 How can I remove the second row and obtain this matrix? 45 23 549 3 32 Best Answer a=[45 23 54;0 0 0;9 3 32];zero=a==0;ind=all(zero,2);a(ind,:)=[]Presumably the entire row has to have zero in every column for it to be removed Related SolutionsMATLAB: Selection of rows in a matrix A = [36 13 9 21 23 32 35 5 3 43]B = A([1,3,5],:) MATLAB: Sort entire row b = sortrows(a,2); Related QuestionI have a matrix with two columns. I want to create a new one that only contains the rows without a 0 in the second column.How to display entire rowMatch row column of matrixIndexing an entire for loopI need to give 36*36 matrix as input which contains only 4 columns and the remaining as non zero columns,now how can I reduce the input memoryHow to change an entire column.How to get the column number that have ones in a row
Best Answer