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

1 次查看(过去 30 天)
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 中查找有关 Get Started with MATLAB 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by