I have a function that takes an N X M array, A, and I want to take the sum of each column. The sum of the rows and sums of the two diagonals, the major diagonal first.
1 回表示 (過去 30 日間)
古いコメントを表示
function [s] = multiSum(A)
s=sum(A(:,end))
end
採用された回答
Walter Roberson
2023 年 2 月 16 日
2 件のコメント
the cyclist
2023 年 2 月 16 日
I'm not convinced they "found" sum, as opposed to being given this function framework to adapt for a homework assignment. :-)
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Migrate GUIDE Apps についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!