MATLAB: How to delete a row from the matrix? Suppose if I have a matrix as: san = [ 1 2 3; 4 5 6; 7 8 9; 10 11 12; 13 14 15] if I want to delete second row and all of its column then ow can I do this?? Best Answer san(2,:) = [] Related SolutionsMATLAB: How to create different column as a different vector from a matrix Don't use q1, q2, q3. Use the following. You can reference it using q{1},q{2},q{3}. Even further, q{1}(2), q{3}(4).a=[1 2 3;4 5 6;7 8 9;10 11 12]; q=cell(size(a,2),1);for i = 1 : size(a, 2) q{i} = a(:,i); end MATLAB: Adding matrices rows having the same id Assuming A and B have the same number of columns, AB = [A;B]; C = [unique(AB(:,1)), splitapply(@(x) sum(x,1), AB(:,2:end), AB(:,1))]; Result:C = 1 13 17 18 2 14 9 4 3 14 14 9 4 5 6 2 Related Question
Best Answer