Institut de Robòtica i Informàtica Industrial

mtimes

PURPOSE ^

Product of a Gaussian and a constant/Gaussian.

SYNOPSIS ^

function g=mtimes(g1,g2)

DESCRIPTION ^

   Product 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 INFORMATION ^

This function calls:
  • Product gmOut=Product(gm1,gm2)
  • mtimes Product of a GMixture and a constant/GMixture.
  • Product Product of two Gaussians.
  • Scale Product of a Gaussian and a constant (matrix).
  • mtimes Product of a Gaussian and a constant/Gaussian.
This function is called by:
  • mtimes Product of a GMixture and a constant/GMixture.
  • mtimes Product of a Gaussian and a constant/Gaussian.

SOURCE CODE ^

0001 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


Institut de Robòtica i Informàtica Industrial

Generated on Wed 05-Aug-2009 15:05:21 by m2html © 2003