MATLAB Answers

Creating a grid where means can be calculated in each cell and then each grid cell coloured accordingly.

1 view (last 30 days)
Cas Cas
Cas Cas on 23 Jul 2015
Edited: Cas Cas on 23 Jul 2015
I'm organizing data (x and y coordinates and a third value associated with each point). I'm able to plot everything and capture frames as the particles and create videos of their motion. Now I'm trying to create a grid where the third values in each cell are summed and then averaged. Then the grid cell should be coloured according to the mean value of the third value in the cell. Here's my code: I've made it up to the point where I can get the mean volume in each cell, but I'm not sure how to implement the colouring of the cells now. I'm using a fine grid and thousands of data points.
Any advice would be appreciated. Also, if you have suggestions on making my code better, or a better existing function, that would be great. Thanks.
Code: https://www.dropbox.com/s/qxwsfz1i7ebdp53/grd.m?dl=0

Answers (0)

Tags

Products

Community Treasure Hunt

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

Start Hunting!