2D histogram for field distribution

3 ビュー (過去 30 日間)
Sérgio Querido
Sérgio Querido 2015 年 4 月 19 日
コメント済み: Image Analyst 2015 年 4 月 19 日
I have a problem with the 2d histogram attach file. I have the coordinates (x,y) of a lot of soccer players and i want to know their field distribution and how many times each palyer is in each "N" bens of the field. Using the 2d histogram code, i have a quetions?
- table size: 120m x 90m (same of soccer field) - bens size: 1m2 - N bens= 10800

採用された回答

Image Analyst
Image Analyst 2015 年 4 月 19 日
I said to use hist3:
fontSize = 20;
numberOfPeopleOnField = 1000;
% Make up some X coordinates for numberOfPeopleOnField people.
x = 120 * rand(numberOfPeopleOnField, 1);
% Make up some Y coordinates for numberOfPeopleOnField people.
y = 90 * rand(numberOfPeopleOnField, 1);
xy = [x, y];
hist3(xy,[120, 90])
xlabel('X', 'FontSize', fontSize);
ylabel('Y', 'FontSize', fontSize);
zlabel('Count (# of People)', 'FontSize', fontSize);
  2 件のコメント
Sérgio Querido
Sérgio Querido 2015 年 4 月 19 日
And for using 2D histogram code?
Image Analyst
Image Analyst 2015 年 4 月 19 日
That is a 2D histogram, despite their poor choice of a name hist3(). It's really a 2D histogram but when they display it, they use a perspective view so it looks 3D-ish so I guess that's why they called it hist3().

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeHistograms についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by