Code covered by the BSD License  

Highlights from
Flocking Algorithm

image thumbnail
from Flocking Algorithm by Shlomo Segal
A Simple application of a flocking algorithm. Following Gervasi Coordination without Communicatio

flockNumOfBots(F);
function n = flockNumOfBots(F);

% Find the number of bots (raws) in the groups F
% F could be real followers or target slots
% input F (3xn)
% output n - number of rows

[n three] = size(F);

return

Contact us at files@mathworks.com