フィルターのクリア

sum element of several matrix

2 ビュー (過去 30 日間)
Davide Di Pasquale
Davide Di Pasquale 2018 年 7 月 4 日
コメント済み: Guillaume 2018 年 7 月 4 日
I have 100 matrix (mxm). I want to sum each element, in order to obtain a matrix with same dimension (mxm)of the 100 I have already got.
SUM(1,1)=A(1,1)+B(1,1)+.....+N(1,1)
SUM(2,1)=A(1,1)+B(2,1)+.....+N(2,1)
Sum(N,N)= A(N,N)+B(N,N)+.....+N(N,N)
hopefully is clear.
  7 件のコメント
Guillaume
Guillaume 2018 年 7 月 4 日
Davide Di Pasquale's comment mistakenly posted as an answer moved here:
the problem is the these matrices are generated inside a loop. So it is not straightforward do what you suggested. Regards
Guillaume
Guillaume 2018 年 7 月 4 日
It is trivial to change your loop so that it does not generate all these matrices. In fact, you must have gone through some hoops just to generate these individual matrices.
Show us your loop code and we'll show you how to simplify it.

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by