フィルターのクリア

summation of elements in multi dimensional matrix

1 回表示 (過去 30 日間)
fatema saba
fatema saba 2015 年 1 月 2 日
コメント済み: fatema saba 2015 年 1 月 2 日
Hi
any body there
I have a three dimensional matrix called C. dimension of this matrix is (3,3,k).
K is changeable. I want to create matrix D like that:
D=(C(:,:,1)+C(:,:,2)+....C(:,:,K)
K is changeable. and my be more than 30.
Thankyou
  2 件のコメント
Stephen23
Stephen23 2015 年 1 月 2 日
Is K==k ?
fatema saba
fatema saba 2015 年 1 月 2 日
yes sorry

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

採用された回答

Stephen23
Stephen23 2015 年 1 月 2 日
編集済み: Stephen23 2015 年 1 月 2 日
Use sum with its second optional argument:
D = sum(C,3)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMathematics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by