Institut de Robòtica i Informàtica Industrial

DiscretizeObsModel

PURPOSE ^

Discretizes the observation model on the state side.

SYNOPSIS ^

function DOM=DiscretizeObsModel(OM,DS)

DESCRIPTION ^

   Discretizes the observation model on the state side.

   Defines an observation model on a discrete state space from an
   observation model on a continuous one.
   In both cases the observation space is discrete.

CROSS-REFERENCE INFORMATION ^

This function calls:
  • Value Evaluates a GMixture.
  • Value Evaluation of a Gaussian.
  • DS_DO_ObsModel DS_DO_ObsModel constructor.
  • dim Dimensionality of a continuous space.
  • dim Dimensionality of a discrete space.
This function is called by:

SOURCE CODE ^

0001 function DOM=DiscretizeObsModel(OM,DS)
0002 %   Discretizes the observation model on the state side.
0003 %
0004 %   Defines an observation model on a discrete state space from an
0005 %   observation model on a continuous one.
0006 %   In both cases the observation space is discrete.
0007 %
0008 
0009   ns=dim(DS);
0010   
0011   no=dim(OM.O);
0012   p=cell(1,no);
0013   for i=1:no
0014     p{i}=zeros(ns,1);
0015     for j=1:ns
0016       p{i}(j)=Value(OM.p{i},DS(j));
0017     end
0018   end
0019   
0020   % Ensure that  sum_o p(o|s)=1
0021   % For the contin
0022   s=p{1};
0023   for i=2:no
0024     s=s+p{i};
0025   end  
0026   for i=1:no
0027     p{i}=p{i}./s;
0028   end
0029   
0030   DOM=DS_DO_ObsModel(DS,OM.O,p);


Institut de Robòtica i Informàtica Industrial

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