plotPURPOSEPlots the CS_CO_ObsModel
SYNOPSISfunction h=plot(OM)
DESCRIPTIONPlots the CS_CO_ObsModel Plot a 3d surface representing the obs model p(o|s) in continuous observation and state spaces It only works for one-dimensional spaces. CROSS-REFERENCE INFORMATIONThis function calls:
SOURCE CODE0001 function h=plot(OM) 0002 % Plots the CS_CO_ObsModel 0003 % 0004 % Plot a 3d surface representing the obs model p(o|s) in continuous 0005 % observation and state spaces 0006 % It only works for one-dimensional spaces. 0007 0008 if dim(OM.S)==1 && dim(OM.O)==1 0009 0010 s=min(OM.S):0.25:max(OM.S); 0011 o=min(OM.O):0.25:max(OM.O); 0012 ns=size(s,2); 0013 no=size(o,2); 0014 sp=zeros(ns,no); 0015 for i=1:ns 0016 for j=1:no 0017 sp(i,j)=sum(OM.w.*cellfun(@(g)(Value(g,s(i))),OM.gS).*cellfun(@(g)(Value(g,o(j))),OM.gO)); 0018 end 0019 end 0020 h=surf(s,o,sp'); 0021 else 0022 error('CS_CO_ObsModel plot only implemented for one-dimensional S/O spaces'); 0023 end |