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