Difference between revisions of "Ttclass/size.m"

From Spinach Documentation Wiki
Jump to: navigation, search
m (Add missing Version/authors metadata and remove raw author emails)
m (Repair ttclass function page template)
Line 1: Line 1:
 
{{DISPLAYTITLE:ttclass/size.m}} __NOTOC__
 
{{DISPLAYTITLE:ttclass/size.m}} __NOTOC__
Returns the size of the matrix represented by a tensor train. The output mimics Matlab's size function.
+
Returns the size of the matrix represented by a tensor train.
Syntax:
+
The output mimics Matlab's size function.
  
    varargout=size(tt,dim)
+
==Syntax==
  
If dim is omitted, the function returns the two-element row vector [m n]. If dim is 1 or 2, it returns the corresponding dimension.
+
    [m,n]=size(tt,dim)
  
For large tensor train matrices, m and n may be too large to fit into the maximum integer permitted by Matlab.
+
==Arguments==
 +
 
 +
    tt  - a tensor train representation of a matrix
 +
 +
    dim - (optional) integer specifying dimension
 +
 
 +
==Outputs==
 +
 
 +
    m,n - integers specifying the dimensions
 +
 
 +
==Notes==
 +
for large tt matrices, m and n may be too large to fit
 +
      into the maximum integer permitted by Matlab.
  
 
==See also==
 
==See also==

Revision as of 18:04, 5 June 2026

Returns the size of the matrix represented by a tensor train. The output mimics Matlab's size function.

Syntax

    [m,n]=size(tt,dim)

Arguments

    tt  - a tensor train representation of a matrix

    dim - (optional) integer specifying dimension

Outputs

    m,n - integers specifying the dimensions

Notes

for large tt matrices, m and n may be too large to fit

     into the maximum integer permitted by Matlab.

See also

ttclass.m, ttclass/sizes.m, ttclass/nnz.m, Tensor train functions

Version 2.1, authors: Dmitry Savostyanov, Ilya Kuprov