Difference between revisions of "Cell/totsum.m"
(Normalise sequential blank lines) |
m (Rename Arguments section heading to Parameters) |
||
| Line 6: | Line 6: | ||
S=totsum(A) | S=totsum(A) | ||
| − | == | + | ==Parameters== |
A - a cell array of numerical objects | A - a cell array of numerical objects | ||
Revision as of 17:47, 5 June 2026
A sum across all dimensions of a cell array.
Syntax
S=totsum(A)
Parameters
A - a cell array of numerical objects
Outputs
S - the sum of all elements in A
Examples
>> totsum({1,2,sparse(3)}')
ans =
(1,1) 6
Notes
If all elements of A are sparse, a sparse result will be returned.
See also
cell/minus.m, cell/plus.m, cell/mtimes.m
Version 2.9, authors: Ilya Kuprov