Institut de Robòtica i Informàtica Industrial

plus

PURPOSE ^

Adds a Gaussian and a constant/Gaussian.

SYNOPSIS ^

function g=plus(g1,g2)

DESCRIPTION ^

   Adds a Gaussian and a constant/Gaussian.

   Add two Gaussians: Add the mean and the covariance. This results on a
   convolution of one Gassian into another.
   If one of the parameters is not a Gaussian, we offset the mean of the
   Gaussian given as a parameter.

   See also offset.

CROSS-REFERENCE INFORMATION ^

This function calls:
  • plus Adds two GMixtures.
  • Gaussian Gaussian construtor.
  • Offset Adds a constant to a Gaussian.
  • plus Adds a Gaussian and a constant/Gaussian.
This function is called by:
  • minus Substract a Gauussian and a constant/Gaussian.
  • plus Adds a Gaussian and a constant/Gaussian.

SOURCE CODE ^

0001 function g=plus(g1,g2)
0002 %   Adds a Gaussian and a constant/Gaussian.
0003 %
0004 %   Add two Gaussians: Add the mean and the covariance. This results on a
0005 %   convolution of one Gassian into another.
0006 %   If one of the parameters is not a Gaussian, we offset the mean of the
0007 %   Gaussian given as a parameter.
0008 %
0009 %   See also offset.
0010 
0011   if isa(g1,'Gaussian')
0012     if isa(g2,'Gaussian')
0013       g=Gaussian(g1.m+g2.m,g1.S+g2.S);
0014     else
0015       if isa(g2,'double')
0016         g=Offset(g1,g2);
0017       else
0018         error('Invalid parameter type in Gaussian mtimes')
0019       end
0020     end
0021   else
0022     g=plus(g2,g1);
0023   end
0024 
0025


Institut de Robòtica i Informàtica Industrial

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