Home > src > demos > ungm_demo > ungm_demo_loop.m

ungm_demo_loop

PURPOSE ^

% Run the UNGM demo ns times to obtain some reliable results

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

% Run the UNGM demo ns times to obtain some reliable results

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 
0002 
0003 %% Run the UNGM demo ns times to obtain some reliable results
0004 
0005   % Number of loops
0006   ns = 100;
0007   
0008   % Allocate space for results
0009     
0010   mse_results = zeros(11,ns);
0011   
0012   for loop = 1:ns
0013 
0014       % Run UNGM demo in silent mode
0015       ungm_demo
0016       
0017       mse_results(:,loop) = [UKF1_MSE; UKS1_MSE; UKF2_MSE; UKS2_MSE; ...
0018                              EKF_MSE; ERTS_MSE; BS_MSE; ...
0019                              GHKF_MSE; GHRTS_MSE; CKF_MSE; CRTS_MSE];
0020 
0021   end
0022 
0023   clc
0024   
0025   % Calculate means
0026   means = mean(mse_results,2);
0027   UKF1_MSE  = means(1);
0028   UKS1_MSE  = means(2);
0029   UKF2_MSE  = means(3);
0030   UKS2_MSE  = means(4);
0031   EKF_MSE   = means(5);
0032   ERTS_MSE  = means(6);
0033   BS_MSE    = means(7);
0034   GHKF_MSE  = means(8);
0035   GHRTS_MSE = means(9);
0036   CKF_MSE   = means(10);
0037   CRTS_MSE  = means(11);
0038       
0039   % Show average results
0040   fprintf('Average MSE results over %i Monte Carlo runs\n',ns);
0041   fprintf('UKF1-MSE  = %.4f\n',UKF1_MSE);
0042   fprintf('UKS1-MSE  = %.4f\n',UKS1_MSE);
0043   fprintf('UKF2-MSE  = %.4f\n',UKF2_MSE);
0044   fprintf('UKS2-MSE  = %.4f\n',UKS2_MSE);
0045   fprintf('EKF-MSE   = %.4f\n',EKF_MSE);
0046   fprintf('ERTS-MSE  = %.4f\n',ERTS_MSE);
0047   fprintf('BS-MSE    = %.4f\n',BS_MSE);
0048   fprintf('GHKF-MSE  = %.4f\n',GHKF_MSE);
0049   fprintf('GHRTS-MSE = %.4f\n',GHRTS_MSE);
0050   fprintf('CKF-MSE   = %.4f\n',CKF_MSE);
0051   fprintf('CRTS-MSE  = %.4f\n',CRTS_MSE);

Generated on Fri 12-Aug-2011 15:15:16 by m2html © 2005