Subtraction of matrix rows

2 次查看(过去 30 天)
fathi
fathi 2018-7-25
编辑: Stephen23 2018-7-25
I like to the subtraction of matrix rows .. EX. A = [ 2 3 4; 3 2 3] ... I want the absolute value from substation the first row from the second row and make the summation of the new row.... so the answer suppose to be as next:... 1. B = [ 1 1 1 ]..... And ..D = 3 ... thank you

回答(1 个)

Stephen23
Stephen23 2018-7-25
编辑:Stephen23 2018-7-25
diff(A)
diff(A,1,1)

类别

Help CenterFile Exchange 中查找有关 Operating on Diagonal Matrices 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by