MATLAB: Delete rows from matrix delete rows Let's say we have matrix A=[1 2 3; 4 5 6; 7 8 9; 10 11 12], and b a number the user is inserting. I want to delete 1st row if b=1, or delete the 2nd row if b=2 etc. Is this possible? Best Answer A=[ 1 2 3;... 4 5 6;... 7 8 9;... 10 11 12]b=2;A(b,:)=[] Related SolutionsMATLAB: Deleting number [C1,ic] = setdiff(A,B)[i1,i1] = sort(ic)C = C1(i1)ORC = A(~ismember(A,B)) MATLAB: Delete rows from matrix according to another matrix setdiff(A,B,'rows') Related QuestionDeleted questionsDelete rows in Matrix ‘A’ with same values ‘c’ in column ‘b’Shift matrix from a specific rowHow to find a subset matrix in the main matrix and build a new matrixDelete matrix in cell
Best Answer