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 view (last 30 days)
Show older comments
function [s] = multiSum(A)
s=sum(A(:,end))
end
Accepted Answer
Walter Roberson
on 16 Feb 2023
2 Comments
the cyclist
on 16 Feb 2023
I'm not convinced they "found" sum, as opposed to being given this function framework to adapt for a homework assignment. :-)
More Answers (0)
See Also
Categories
Find more on Migrate GUIDE Apps in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!