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 日

2 投票

output = sum(precip,3);

3 件のコメント

Damith
Damith 2015 年 7 月 15 日
Thanks.
hussain Palagiri
hussain Palagiri 2021 年 11 月 14 日
How to get sum for only 90 pages out of 365 pages?
Matt J
Matt J 2021 年 11 月 14 日
output = sum(precip(:,:,1:90),3);

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeMatrix Indexing についてさらに検索

タグ

質問済み:

2015 年 7 月 14 日

コメント済み:

2021 年 11 月 14 日

Community Treasure Hunt

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

Start Hunting!

Translated by