Borrar filtros
Borrar filtros

Computing point density in 1mx1m box placed across the graph

2 visualizaciones (últimos 30 días)
Adil Ali
Adil Ali el 14 de Nov. de 2019
Comentada: Adam Danz el 14 de Nov. de 2019
I am trying to build a tool where I have plotted 2D points in a graph using
scatter(X,Y,ptSz,'r','filled');
I would like to examine the spread of points over the 2D area by placing 1mx1m box across the acrea and computing the number of points in each box. I would like to know which box has least and most amount of points. I would also like to compute the average number of points in the boxes.
Eventually it would be effective to color map the boxes, representing the density of points.
  2 comentarios
darova
darova el 14 de Nov. de 2019
What about for loop? Do you have some attempts?
Adam Danz
Adam Danz el 14 de Nov. de 2019
histcounts2() does that.
It counts the density of (x,y) coordinates within each bin that you specify.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Line Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by