How to subtract row 1 of matrixA from row 2 of matrixB (matrices are of same size)

1 次查看(过去 30 天)
I want to subtract the first row of matrixA from the second row of matrixB for each participant (matrices are of same size). matrix sizes equal 12x59
For example: second row of B - first row of A; thrid row of B - second row of A; and so on..
the first row of B and the last row of A will become irrelevant.
Any suggestions?
Thanks in advance, Peter

采纳的回答

Star Strider
Star Strider 2017-12-18
Try this:
Out = B(2:end,:) - A(1:end-1,:);

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by