TTeMPS_op_to_TTeMPS Convert to TT Toolbox matrix format. TT = TTeMPS_op_to_TTeMPS( A ) takes the TTeMPS operator A and converts it into a TTeMPS object by reshaping. See also TTeMPS_op_to_TT_matrix
0001 function B = TTeMPS_op_to_TTeMPS( A ) 0002 %TTeMPS_op_to_TTeMPS Convert to TT Toolbox matrix format. 0003 % TT = TTeMPS_op_to_TTeMPS( A ) takes the TTeMPS operator A and converts it into 0004 % a TTeMPS object by reshaping. 0005 % 0006 % See also TTeMPS_op_to_TT_matrix 0007 0008 % TTeMPS Toolbox. 0009 % Michael Steinlechner, 2013-2016 0010 % Questions and contact: michael.steinlechner@epfl.ch 0011 % BSD 2-clause license, see LICENSE.txt 0012 0013 U = cellfun(@(y) reshape(y, [size(y,1), size(y,2)*size(y,3), size(y,4)]), ... 0014 A.U, 'UniformOutput', false); 0015 0016 B = TTeMPS( U ); 0017 end