0001 function [pol_dist] = getPolicyDistribution(Family_plRec, choice)
0002
0003
0004
0005
0006
0007 switch choice
0008 case 'cmp'
0009 idx = 1;
0010 case 'plt1'
0011 idx = 2;
0012 case 'plt2'
0013 idx = 3;
0014 case 'plt3'
0015 idx = 4;
0016 otherwise
0017 disp(['getPolicyDistribution: Wrong value for parameter choice: ' choice]);
0018 end
0019
0020 [noOfParticles, noOfStructs] = size( Family_plRec );
0021 pol_dist = [];
0022
0023
0024
0025
0026
0027
0028
0029 if strcmp(choice, 'cmp')
0030 for p = 1:noOfParticles
0031 pol_dist = [pol_dist; Family_plRec{p, idx}.CmpPol'];
0032 end;
0033 else
0034 for p = 1:noOfParticles
0035 pol_dist = [pol_dist; Family_plRec{p, idx}.PltPol'];
0036 end;
0037 end;
0038