Method of subtracting a number from a three-dimensional matrix

조회 수: 5 (최근 30일)
nada
nada 2020년 6월 4일
댓글: KSSV 2020년 6월 4일
Welcome all and thanks in advance for help.
I have a 3D matrix size (300 x 16 x 21), I want to find a loop to subtract the number 1000 from the first column that has 300 rows

채택된 답변

KSSV
KSSV 2020년 6월 4일
편집: KSSV 2020년 6월 4일
Instead of loop, you can do the following: LEt A be your matrix of size 300x16x21.
A(:,1,:) = A(:,1,:)-1000 ;
  댓글 수: 2
nada
nada 2020년 6월 4일
thank you KSSV
I mean, it works like this example
A( 300x16x21) - 1000= (1-1000 , : , : )
(2-1000, : , : )
*
*
*
(300-1000, : , : )
A(new) = A(300 , 16 ,21 )

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by