Summing scattered data over a 2D grid
Mostrar comentarios más antiguos
I have three arrays of values: X-coordinate, Y-coordinate, and concentation. Each point in the image has its own unique concentration value assigned to it.
As you can see in the image, this data is irregularly scattered. However, I would like to be able to define a grid (like the one in the image), and sum the concentration values of all the points that lie within each grid and points that lie on the boundary of the grids. If a value is on the boundary of two grids, it does not matter which grid it is included in but it cannnot be included in the other grid, so no duplicates. As a check, I need the sum of the final gridded data to be the same as the sum of the concentration array.
I would imagine you could use histograms in some way, which I have seen on here for similar applications, but I need to actually sum the data within the bins, not count the number of occurences.

Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Scatter Plots en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!