How can I count the number of points within a grid?

So I have this scatterxy plot [-1,1] with a number of points and inside that I have drawn grids[.1X.1]. What would be the best way to count the number points within these grids, like the weight of each grid.? Creating matrices for each grid and comparing points is one but wouldn't that be quite a lenghty process memory wise?
Any suggestion is appreciated, Thanks!!

Answers (1)

There is a function hist3 in the Statistics Toolbox that is what you want, I believe.

Categories

Find more on Get Started with MATLAB in Help Center and File Exchange

Tags

Asked:

N R
on 9 Feb 2013

Community Treasure Hunt

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

Start Hunting!