We are working on pedestrian tracking using particle filter.Logic to spread particles randomly initially in the particle filter algorithm. Can anybody please help us with this?

1 次查看(过去 30 天)
We have tried the following logic :
s_initial=zeros(5,N);
for i=1:N
s_initial(:,i)=[
90
136
20
50
0
];
end
the logic above spreads all the N particles at (x=90,y=136)location. We want to spread the particles randomly throughout the frame.how do we do this??please help us with this

回答(1 个)

Birdman
Birdman 2018-2-14
You may use randi function to generate integer values in the for loop.
s_initial(:,i)=randi([50 150],size(s_initial,1),1);

类别

Help CenterFile Exchange 中查找有关 Particle Swarm 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by