Difference between revisions of "Ttclass/sum.m"

From Spinach Documentation Wiki
Jump to: navigation, search
(Normalise remaining wiki page to current Spinach source header)
(Restore pre-bulk-edit wiki content)
Line 1: Line 1:
−
{{DISPLAYTITLE:ttclass/sum.m}} __NOTOC__
+
Sum of elements of a tensor train representation of a matrix. Syntax:
  
−
Sum of elements of a tensor train representation of a matrix.
 
  
−
==Syntax==
 
  
−
answer=sum(ttrain,dim)
+
    answer=sum(ttrain,dim)
 +
 
 +
The sum is taken along the specified dimension (dim=1 or dim=2).

Revision as of 14:50, 5 April 2026

Sum of elements of a tensor train representation of a matrix. Syntax:


    answer=sum(ttrain,dim)

The sum is taken along the specified dimension (dim=1 or dim=2).