Home > tt2 > @tt_tensor > disp.m

disp

PURPOSE ^

Command window display of a TT-tensor.

SYNOPSIS ^

function disp(tt,name)

DESCRIPTION ^

Command window display of a TT-tensor.



 TT-Toolbox 2.2, 2009-2012

This is TT Toolbox, written by Ivan Oseledets et al.
Institute of Numerical Mathematics, Moscow, Russia
webpage: http://spring.inm.ras.ru/osel

For all questions, bugs and suggestions please mail
ivan.oseledets@gmail.com
---------------------------

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function disp(tt,name)
0002 %Command window display of a TT-tensor.
0003 %
0004 %
0005 %
0006 % TT-Toolbox 2.2, 2009-2012
0007 %
0008 %This is TT Toolbox, written by Ivan Oseledets et al.
0009 %Institute of Numerical Mathematics, Moscow, Russia
0010 %webpage: http://spring.inm.ras.ru/osel
0011 %
0012 %For all questions, bugs and suggestions please mail
0013 %ivan.oseledets@gmail.com
0014 %---------------------------
0015 
0016 if ~exist('name','var')
0017     name = 'ans';
0018 end
0019 r=tt.r; n=tt.n; 
0020 d=tt.d;
0021 fprintf('%s is a %d-dimensional TT-tensor, ranks and mode sizes: \n',name,d);
0022 %fprintf('r(1)=%d \n', r(1));
0023 for i=1:d
0024     fprintf('r(%d)=%d \t n(%d)=%d \n',i,r(i),i,n(i));
0025 %   fprintf(' \t n(%d)=%d \n',i,n(i));
0026 %   fprintf('r(%d)=%d \n',i+1,r(i+1));
0027 end
0028  fprintf('r(%d)=%d \n',d+1,r(d+1));
0029

Generated on Wed 08-Feb-2012 18:20:24 by m2html © 2005