MINUS Multiplication of TT/MPS Laplace operator by scalar. A = MTIMES(B, A) multiplies the TT/MPS Laplace operator A by the scalar B. See also PLUS.
0001 function A = mtimes( B, A ) 0002 %MINUS Multiplication of TT/MPS Laplace operator by scalar. 0003 % A = MTIMES(B, A) multiplies the TT/MPS Laplace operator A by the scalar B. 0004 % 0005 % See also PLUS. 0006 0007 % TTeMPS Toolbox. 0008 % Michael Steinlechner, 2013-2016 0009 % Questions and contact: michael.steinlechner@epfl.ch 0010 % BSD 2-clause license, see LICENSE.txt 0011 0012 %A.U{1} = B*A.U{1}; 0013 0014 %A.U{1} = B*A.U{1}; 0015 %Numerically more stable way: distribute scalar over all cores: 0016 b = B^(1/A.order); 0017 for i = 1:A.order 0018 A.U{i} = b*A.U{i}; 0019 end 0020 end