mtimesPURPOSEProduct of a Gaussian and a constant/Gaussian.
SYNOPSISfunction g=mtimes(g1,g2)
DESCRIPTIONProduct of a Gaussian and a constant/Gaussian. Product of two Gaussians or of a Gaussian and a constant factor. If the two parameters are gaussians it returns the Gaussian resulting from multiplying two other Gaussians. Note that the result of multiplying two Gaussians is a un-normalized Gaussian. Here, however, the output is normalized. Function ProductNormFactor returns the scale factor that 'un-normalizes' the product. If one of the inputs is a constant factor, say g2=A, we return the Gaussian resulting from applying the linear mapping A*g1. See also Product, Scale, ProductNormFactor. CROSS-REFERENCE INFORMATIONThis function calls:
SOURCE CODE0001 function g=mtimes(g1,g2) 0002 % Product of a Gaussian and a constant/Gaussian. 0003 % 0004 % Product of two Gaussians or of a Gaussian and a constant factor. 0005 % If the two parameters are gaussians it returns the Gaussian resulting 0006 % from multiplying two other Gaussians. 0007 % Note that the result of multiplying two Gaussians is a un-normalized 0008 % Gaussian. Here, however, the output is normalized. 0009 % Function ProductNormFactor returns the scale factor that 0010 % 'un-normalizes' the product. 0011 % 0012 % If one of the inputs is a constant factor, say g2=A, we return the Gaussian 0013 % resulting from applying the linear mapping A*g1. 0014 % 0015 % See also Product, Scale, ProductNormFactor. 0016 0017 if isa(g1,'Gaussian') 0018 if isa(g2,'Gaussian') 0019 g=Product(g1,g2); 0020 else 0021 if isa(g2,'double') 0022 g=Scale(g1,g2); 0023 else 0024 error('Invalid parameter type in Gaussian mtimes') 0025 end 0026 end 0027 else 0028 g=mtimes(g2,g1); 0029 end |