DRAWPARTICLES - visualize particles of the current target DRAWPARTICLES( PARTICLES, FORMAT ) param: particles - a MxN matrix for M particles each having N attributes param: format - a string of the type used in plot. format is actually sent directly to the plot command. format is optional and may be left out. Default plot format is '.r' (i.e., red star for each particle). AUTHOR Ronnie Johansson CREATED 2004-12-10 ALTERED 2004-12-21 - minor change to default format
0001 function drawParticles( particles, format) 0002 % 0003 % DRAWPARTICLES - visualize particles of the current target 0004 % 0005 % DRAWPARTICLES( PARTICLES, FORMAT ) 0006 % param: particles - a MxN matrix for M particles each having N attributes 0007 % param: format - a string of the type used in plot. format is 0008 % actually sent directly to the plot command. format is optional 0009 % and may be left out. Default plot format is '.r' (i.e., red star 0010 % for each particle). 0011 % 0012 % AUTHOR Ronnie Johansson 0013 % CREATED 2004-12-10 0014 % ALTERED 2004-12-21 - minor change to default format 0015 % 0016 0017 if nargin < 2 0018 format = '.r'; 0019 end 0020 0021 plot(particles(:, 2), particles(:, 1), format)