MATLAB: Matlab row subtraction of matrix matrix manipulation Matlab subtractions of rows of matrix(eg:- row2-row1) and then how to rewrite the resulatant entire matrix where 2nd row = row2 – row1 Best Answer On the other hand, maybe you want to subtract row 2 from all the rows. In that case, you can do this.>> AA = 1 2 3 4 11 12 13 14 22 23 24 25 42 43 44 45>> AsubRow2 = A - A(2,:)AsubRow2 = -10 -10 -10 -10 0 0 0 0 11 11 11 11 31 31 31 31 Related SolutionsMATLAB: Convert string to number or array I'm guessing it's the space that is causing the problem. Run your array throughx = regexprep(x,' ','');first to remove the spaces. MATLAB: Matlab row Subtraction operation change only 2nd row Aprime = A;Aprime(2,:) = Aprime(2,:) - Aprime(1,:); Related QuestionHow interpolate 3d pointsI have a 2 by 26 matrix, how do i randomly select one of the rows and extract themSubtract numbers in the rowChanging arrays of a matrix
Best Answer