Number of people who passes a point

1 view (last 30 days)
I have a data of coordinates of moving people and I'm looking for a way to find the number of people who passes a certain range of (x,y) points for example a line from (-20,-20) to (20,20). The data is always increasing in both directions i.e. x2>x1 and Y2>1.
  2 Comments
KSSV
KSSV on 2 Nov 2020
  1. Get the equation of line using polyfit. Substitute the point on the line.....if it satisfies the point lies on the line.
  2. Get the area, if area is zero, the point lies on the line.
Abdulkarim Almukdad
Abdulkarim Almukdad on 3 Nov 2020
Hi KSSV thanks for your answer. I didn't understand how this can be done, because I want the points after that line not necessary lies on it, because someone might step further that line, also how should I create the function of the line? should I just assume any values I want, or the values should be selected from the coordinates? moreover, I didn't understand your second point of getting the area.
I have attached a sample of the data, your help is highly appreciated.
Thanks in advance.

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!