How to re-grid a matrix to a coarser resolution and assign the sum of values in the finer cells to the coarser?
Ältere Kommentare anzeigen
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
Akzeptierte Antwort
Weitere Antworten (1)
Image Analyst
am 18 Jul. 2016
Why not just use imresize()
newM = imresize(M, [370,490]);
1 Kommentar
Jamal
am 19 Jul. 2016
Kategorien
Mehr zu Solver Outputs and Iterative Display finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
