how to find the sum of matrix?
5 ビュー (過去 30 日間)
古いコメントを表示
hello, I have a loop as results of K = 1:19, a matrix A (k), my question is how to find the sum (M )of all matrix for each value of k, ie: find M = sum(A (k))
0 件のコメント
回答 (2 件)
Sachin Ganjare
2012 年 10 月 17 日
If I understand your question correctly:
sum_of_all_matrices = sum(A)
2 件のコメント
Sachin Ganjare
2012 年 10 月 17 日
For Example:
a1 = [1 2 3]; a2 = [1 2 3]; a3 = [1 2 3]; a123 = [a1 a2 a3]; sum_out = sum(a123);
sum_out is sum of elements of matrix
参考
カテゴリ
Help Center および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!