Kronecker product of two TT-matrices [C]=KRON(A,B) Kronecker product of two TT-matrices. One of the arguments can be empty. In this case, the other, nonempty argument is returned 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 [c] = kron(a,b) 0002 %Kronecker product of two TT-matrices 0003 % [C]=KRON(A,B) Kronecker product of two TT-matrices. One of the 0004 % arguments can be empty. In this case, the other, nonempty argument is 0005 % returned 0006 % 0007 % 0008 % TT-Toolbox 2.2, 2009-2012 0009 % 0010 %This is TT Toolbox, written by Ivan Oseledets et al. 0011 %Institute of Numerical Mathematics, Moscow, Russia 0012 %webpage: http://spring.inm.ras.ru/osel 0013 % 0014 %For all questions, bugs and suggestions please mail 0015 %ivan.oseledets@gmail.com 0016 %--------------------------- 0017 if ( isempty(a) ) 0018 c=b; 0019 return; 0020 elseif (isempty(b) ) 0021 c=a; 0022 return; 0023 end 0024 c=tt_matrix; 0025 c.n=[(a.n);(b.n)]; 0026 c.m=[(a.m);(b.m)]; 0027 %c.d=a.d+b.d; 0028 c.tt=kron(a.tt,b.tt); 0029 return 0030 end