UpdatePURPOSEBelief evolution under an observation model.
SYNOPSISfunction bOut=Update(b,po,Sp)
DESCRIPTIONBelief evolution under an observation model. Corrects a belief with the information given by the observation model, 'po'. 'po' is derived with GetObservationModelFixedO for the corresponding obs model. Note that we use the backed up samples possibly created in a Predicition step before. If no prediction step was exectued before, the backup and the samples point to the same data. CROSS-REFERENCE INFORMATIONThis function calls:
SOURCE CODE0001 function bOut=Update(b,po,Sp) 0002 % Belief evolution under an observation model. 0003 % 0004 % Corrects a belief with the information given by the observation model, 0005 % 'po'. 0006 % 'po' is derived with GetObservationModelFixedO for the 0007 % corresponding obs model. 0008 % 0009 % Note that we use the backed up samples possibly created in a 0010 % Predicition step before. If no prediction step was exectued before, 0011 % the backup and the samples point to the same data. 0012 0013 c=arrayfun(@(s)(Value(po,s)),b.noiselessMovedSamples); 0014 w=b.w.*c; 0015 g=cell(1,b.np); 0016 for i=1:b.np 0017 g{i}=Gaussian(b.samples(:,i),b.noise); 0018 end 0019 0020 ns=zeros(b.ss,b.np); 0021 nw=zeros(1,b.np); 0022 for i=1:b.np 0023 j=RandVector(w); 0024 ns(:,i)=Crop(Sp,rand(g{j})); 0025 nw(i)=Value(po,ns(:,i))/c(j); 0026 end 0027 0028 bOut=PBelief(nw,ns); 0029 |