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

1 vue (au cours des 30 derniers jours)
M.Prasanna kumar
M.Prasanna kumar le 21 Août 2019
Commenté : M.Prasanna kumar le 21 Août 2019
i have a matrix of 10*50*24*24
i want to add all 10*50 matrices??
any help???

Réponse acceptée

Bruno Luong
Bruno Luong le 21 Août 2019
sum(sum(A,3),4)
or
sum(A(:,:,:),3)

Plus de réponses (2)

madhan ravi
madhan ravi le 21 Août 2019
sum(matrix,[4,3]) % 2018b >=

James Tursa
James Tursa le 21 Août 2019
sum(sum(your_matrix,4),3)
or
sum(reshape(your_matrix,10,50,[]),3)
  1 commentaire
M.Prasanna kumar
M.Prasanna kumar le 21 Août 2019
thank you sir
it is working

Connectez-vous pour commenter.

Catégories

En savoir plus sur Sequence and Numeric Feature Data Workflows dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by