MATLAB: For same Matrix subtraction between rows

loopsMATLABmatrixprogrammingSymbolic Math Toolbox

I have matrix size (1508 x 19).
I want to do subtraction between rows like Row 1 – Row 2, Row 1 – Row 4, Row 1 – Row 6, Row 1 – Row 8, Row 1 – Row 10, Row 1 – Row 12, Row 1 – Row 14,
Row 1 – Row 16, Row 1 – Row 18.
without changing the size of a matrix and remainng rows like (row 1, 3, 5, 7, 9, 11, 13, 15, 17, 19) stay same in matrix.
Can some one help me please
Thank you in advance…

Best Answer

a(2:2:end,:) = a(1,:)-a(2:2:end,:);