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 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Joshua
am 16 Feb. 2023
Kommentiert: Joshua
am 16 Feb. 2023
function [s] = multiSum(A)
s=sum(A(:,end))
end
Akzeptierte Antwort
Walter Roberson
am 16 Feb. 2023
2 Kommentare
the cyclist
am 16 Feb. 2023
I'm not convinced they "found" sum, as opposed to being given this function framework to adapt for a homework assignment. :-)
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Migrate GUIDE Apps finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!