cell/totsum.m

From Spinach Documentation Wiki
Revision as of 13:08, 6 August 2018 by Admin (talk | contribs) (Created page with "{{DISPLAYTITLE:cell/totsum.m}} A sum across all dimensions of a cell array. ==Syntax== S=totsum(A) ==Arguments== A - a cell array of numerical objects ==Outputs...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

A sum across all dimensions of a cell array.

Syntax

    S=totsum(A)

Arguments

    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.2, authors: Ilya Kuprov