Difference between revisions of "Cell/totsum.m"

From Spinach Documentation Wiki
Jump to: navigation, search
(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...")
 
(Update function See also links and function index membership)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
−
{{DISPLAYTITLE:cell/totsum.m}}
+
{{DISPLAYTITLE:cell/totsum.m}} __NOTOC__
 
A sum across all dimensions of a cell array.
 
A sum across all dimensions of a cell array.
  
Line 6: Line 6:
 
     S=totsum(A)
 
     S=totsum(A)
  
−
==Arguments==
+
==Parameters==
  
 
     A - a cell array of numerical objects
 
     A - a cell array of numerical objects
Line 26: Line 26:
  
 
==See also==
 
==See also==
−
[[cell/minus.m]], [[cell/plus.m]], [[cell/mtimes.m]]
+
[[cell/minus.m]], [[cell/plus.m]], [[cell/mtimes.m]], [[cell/blkdiag.m]], [[cell/complex.m]], [[cell/inflate.m]], [[cell/times.m]], [[Appendix_H:_Matlab_object_overloads]]
  
−
 
+
''Version 2.9, authors: [[Ilya Kuprov]]''
−
''Version 2.2, authors: [[Ilya Kuprov]]''
 

Latest revision as of 18:34, 6 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, cell/blkdiag.m, cell/complex.m, cell/inflate.m, cell/times.m, Appendix_H:_Matlab_object_overloads

Version 2.9, authors: Ilya Kuprov