Home > src > demos > clutter_demo > clutter_plot2.m

clutter_plot2

PURPOSE ^

Draws the smoothed estimate

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 Draws the smoothed estimate

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001   % Draws the smoothed estimate
0002 
0003   set(gcf,'PaperType','a4');
0004   set(gcf,'PaperPosition',[0.25 2.5 3.8 3]);
0005   set(gca,'Position',[0.25 2.5 3.8 3]);
0006 
0007   I1 = find(TC);
0008   I2 = find(TC == 0);
0009   
0010   clf;
0011   h=plot(Y(1,I1),Y(2,I1),'ko',...
0012          Y(1,I2),Y(2,I2),'kx');
0013   set(h(1),'color',[0.3 0.3 0.3]);
0014   set(h,'markersize',4);
0015   hold on;
0016   
0017   h=plot(X_r(1,:),X_r(2,:),'-',...
0018          S_EST1{1}(1,:),S_EST1{1}(2,:),'--');
0019 
0020   set(h(1),'color',[0.5 0.5 0.5]);
0021   set(h(2),'color',[0.0 0.0 0.0]);
0022 
0023   hold on
0024 
0025   % Plot particles
0026   for k = 1:NT
0027       for i = 1:size(X_r,2)
0028           nvis = 50;
0029           MV = zeros(m,N1);
0030           PV = zeros(m,m,N1);
0031           for j=1:N1
0032               MV(:,j)   = SM{i,j}.M{k};
0033               PV(:,:,j) = SM{i,j}.P{k};
0034           end
0035           %W1 = W_mc1(i,:);
0036           S1 = SS(i,:);
0037           tmp = [S1{:}];
0038           W1 = [tmp.W];
0039           samp = gmm_rnd(MV,PV,W1,nvis);
0040           h = plot(samp(1,:),samp(2,:),'r.');
0041           set(h(1),'color',[0.0 0.0 0.0]);
0042           set(h,'markersize',2);
0043           set(h,'linewidth',2);
0044       end
0045   end
0046 
0047   set(h,'markersize',2);
0048   set(h,'linewidth',2);
0049   set(gca,'FontSize',4);
0050 
0051   legend('Measurement',...
0052          'Clutter Measurement',...
0053          'True Signal',...
0054          'RBMCDA Estimate')
0055   
0056   xlim([cx_min cx_max]);
0057   ylim([cy_min cy_max]);
0058 
0059   hold off

Generated on Tue 19-Feb-2008 16:59:37 by m2html © 2003