DiscretizeObsModelPURPOSEDiscretizes the observation model on the state side.
SYNOPSISfunction DOM=DiscretizeObsModel(OM,DS)
DESCRIPTIONDiscretizes 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 INFORMATIONThis function calls:
SOURCE CODE0001 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); |