Obtain SUM for a 3D matrix

60 次查看(过去 30 天)
Damith
Damith 2015-7-14
评论: Matt J 2021-11-14
Hi,
I have a precip matrix 360 x 280 x 365 and I want to obtain the sum for all the values in (:,:,365). For example,
output = sum(precip(360x280x1)+precip(360x280x2)+precip(360x280x3)..+precip(360x280x365)
So, the output matrix should be, output = 360 x 280. Can anyone suggest me a methos in MATLAB?
Thanks in advance.

采纳的回答

Matt J
Matt J 2015-7-14
编辑:Matt J 2015-7-14
output = sum(precip,3);

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by