Matlab row Subtraction operation change only 2nd row

1 view (last 30 days)
In Matlab after subtraction operation of row2 of the same matrix(eg:-row2' = row2-row1) how to rewrite the resulatant matrix where 1st row is as it is and 2nd row' = row2 - row1 A'=[row1; row2']

Accepted Answer

Walter Roberson
Walter Roberson on 30 Jan 2021
Aprime = A;
Aprime(2,:) = Aprime(2,:) - Aprime(1,:);

More Answers (0)

Categories

Find more on External Language Interfaces in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!