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 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Joshua
el 16 de Feb. de 2023
Comentada: Joshua
el 16 de Feb. de 2023
function [s] = multiSum(A)
s=sum(A(:,end))
end
Respuesta aceptada
Walter Roberson
el 16 de Feb. de 2023
2 comentarios
the cyclist
el 16 de Feb. de 2023
I'm not convinced they "found" sum, as opposed to being given this function framework to adapt for a homework assignment. :-)
Más respuestas (0)
Ver también
Categorías
Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!