필터 지우기
필터 지우기

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