How to re-grid a matrix to a coarser resolution and assign the sum of values in the finer cells to the coarser?
Mostrar comentarios más antiguos
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
Respuesta aceptada
Más respuestas (1)
Image Analyst
el 18 de Jul. de 2016
Why not just use imresize()
newM = imresize(M, [370,490]);
1 comentario
Jamal
el 19 de Jul. de 2016
Categorías
Más información sobre Solver Outputs and Iterative Display 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!
