Home > src > PF > reIncarnation.m

reIncarnation

PURPOSE ^

Creates new particles from priorpartiklar distribution where probability

SYNOPSIS ^

function [new_born_particles] = reIncarnation(noOfDeadParticles,priorpartiklar)

DESCRIPTION ^

Creates new particles from priorpartiklar distribution where probability
of choosing ecah elemet of priorpartiklar is equal to
1/length(priorpartiklar)
 altered: rj - 050118

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 
0002 function [new_born_particles] = reIncarnation(noOfDeadParticles,priorpartiklar)
0003 %Creates new particles from priorpartiklar distribution where probability
0004 %of choosing ecah elemet of priorpartiklar is equal to
0005 %1/length(priorpartiklar)
0006 % altered: rj - 050118
0007 
0008 
0009 new_born_particles = [];
0010 for i = 1:noOfDeadParticles
0011     idx = round(1 + (length(priorpartiklar(:,1)) - 1)*rand);
0012     priorpartiklar(idx, :);
0013     new_born_particles = [new_born_particles ; priorpartiklar(idx, :)];
0014 end;
0015 new_born_particles;

Generated on Wed 16-Mar-2005 09:17:47 by m2html © 2003