How to re-grid a matrix to a coarser resolution and assign the sum of values in the finer cells to the coarser?
Afficher commentaires plus anciens
Hello,
I have a matrix of 4530*6000 and need to re-grid it with a factor of 12.245 which gives a matrix of 370*490 dimensions. What I need is to assign the sum of the values of each 12.245*12.245 cells which are population to each cell of the new matrix. Interp2 does the re-grinding, but interpolate the values of original matrix. I came up with writing a code, but thought there may be a function to help. Thanks for your ideas please?
JZ
Réponse acceptée
Plus de réponses (1)
Image Analyst
le 18 Juil 2016
Why not just use imresize()
newM = imresize(M, [370,490]);
1 commentaire
Jamal
le 19 Juil 2016
Catégories
En savoir plus sur Solver Outputs and Iterative Display dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
