Main Home Quick tour Documentation Mailing Lists Demonstration Download Sourceforge project FAQ History Links
Toolboxes Char Control Crypto Finance FunFun General Graphics Image Internal InputOutput LinearAlgebra Matrix Miscellaneous Net Polynomial Set Signal SpecFun SpecialMatrix Statistics String System Time Trigonometric ...
Contact Developers
answer = sum(matrix) answer = sum(structure)
Returns the sum of all the elements of a matrix or a structure.
sum([1,2;3,4]) = 10 sum([1,2,3;4,5,6]) = 21 x=struct(a, 1, b, 2, c, 3) = a = 1 : b = 2 : c = 3 : sum x = 6
trace, diag
Last modified