how to add all 2d matrices in a 4D matrix???

조회 수: 1 (최근 30일)
M.Prasanna kumar
M.Prasanna kumar 2019년 8월 21일
댓글: M.Prasanna kumar 2019년 8월 21일
i have a matrix of 10*50*24*24
i want to add all 10*50 matrices??
any help???

채택된 답변

Bruno Luong
Bruno Luong 2019년 8월 21일
sum(sum(A,3),4)
or
sum(A(:,:,:),3)

추가 답변 (2개)

madhan ravi
madhan ravi 2019년 8월 21일
sum(matrix,[4,3]) % 2018b >=

James Tursa
James Tursa 2019년 8월 21일
sum(sum(your_matrix,4),3)
or
sum(reshape(your_matrix,10,50,[]),3)

카테고리

Help CenterFile Exchange에서 Sequence and Numeric Feature Data Workflows에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by