Difference between revisions of "Ttclass/size.m"

From Spinach Documentation Wiki
Jump to: navigation, search
(Normalise sequential blank lines)
m (Spot-update function page against current Spinach source)
Line 1: Line 1:
Returns the size of the matrix represented by a tensor train.
+
Returns the size of the matrix represented by a tensor train. The output mimics Matlab's size function.
 
Syntax:
 
Syntax:
  
 
     varargout=size(tt,dim)
 
     varargout=size(tt,dim)
  
For large spin systems M and N may be too large to fit into  
+
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.
the maximum integer permitted by Matlab.
+
 
 +
For large tensor train matrices, m and n may be too large to fit into the maximum integer permitted by Matlab.
  
 
==See also==
 
==See also==
 
[[ttclass.m]], [[ttclass/sizes.m]], [[ttclass/nnz.m]], [[Tensor_train_module#Tensor_train_functions|Tensor train functions]]
 
[[ttclass.m]], [[ttclass/sizes.m]], [[ttclass/nnz.m]], [[Tensor_train_module#Tensor_train_functions|Tensor train functions]]

Revision as of 16:08, 5 June 2026

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

    varargout=size(tt,dim)

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.

For large tensor train 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