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

1 visualizzazione (ultimi 30 giorni)
i have a matrix of 10*50*24*24
i want to add all 10*50 matrices??
any help???

Risposta accettata

Bruno Luong
Bruno Luong il 21 Ago 2019
sum(sum(A,3),4)
or
sum(A(:,:,:),3)

Più risposte (2)

madhan ravi
madhan ravi il 21 Ago 2019
sum(matrix,[4,3]) % 2018b >=

James Tursa
James Tursa il 21 Ago 2019
sum(sum(your_matrix,4),3)
or
sum(reshape(your_matrix,10,50,[]),3)

Categorie

Scopri di più su Sequence and Numeric Feature Data Workflows in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by