Institut de Robòtica i Informàtica Industrial

mtimes

PURPOSE ^

Product of two Gaussians.

SYNOPSIS ^

function G=mtimes(G1,G2)

DESCRIPTION ^

 Product of two Gaussians.

 Product of two Gaussians G1 and G2. It produces a Gaussian as ouput that
 represents the fusion of the information given by the two input Gaussians.

CROSS-REFERENCE INFORMATION ^

This function calls:
  • size Number of poses in a trajectory.
  • size Size of the state estimated in the filter
  • size Size (rows/columns) of an interval matrix.
  • sqrt Element-wise square root of an interval matrix (operator: .^0.5).
  • size Number of parameters of the pose.
  • size Number of readings stored in the Sensor.
This function is called by:

SOURCE CODE ^

0001 function G=mtimes(G1,G2)
0002 % Product of two Gaussians.
0003 %
0004 % Product of two Gaussians G1 and G2. It produces a Gaussian as ouput that
0005 % represents the fusion of the information given by the two input Gaussians.
0006 
0007   if G1.dim~=G2.dim
0008     error('Gaussians with different dimensions in Gaussian product');
0009   end
0010   
0011   if G1.d==0
0012     G=G1;
0013   else
0014     if G2.d==0
0015       G=G2;
0016     else
0017       iS=G1.iS+G2.iS;
0018       
0019       R=chol(iS);
0020       iR=R\eye(size(R));
0021       
0022       d=1;
0023       for i=1:G1.dim
0024         d=d*R(i,i);
0025       end
0026       d=1/(d*d);
0027       
0028       S=iR*iR';
0029       
0030       G.m=S*(G1.iS*G1.m+G2.iS*G2.m);
0031       G.dim=G1.dim;
0032       G.S=S;
0033       G.d=d;
0034       G.iS=iS;
0035       G.ct=1/sqrt(((2*pi)^G.dim)*G.d);
0036       
0037       G=class(G,'Gaussian');
0038     end
0039   end


Institut de Robòtica i Informàtica Industrial

Generated on Fri 24-Jul-2009 12:32:50 by m2html © 2003