Reduce Matrix size with interpolated data arrays
Mostra commenti meno recenti
Hi,
I have a 360*720 precipitation matrix with values in milimeter, and i desire a 180*360 matrix with interpolated data to compare my precipitation with other 180*360 data.
here you can see the original 360*720 plot of my data. please help me on this.
Thank you.

Risposta accettata
Più risposte (1)
Jan
il 11 Mar 2021
The mean over neighboring rows and columns is smarter than a linear interpolation, which just omits the intermediate rows and columns:
x = rand(360, 720);
y = x(1:2:end, :) + x(2:2:end, :);
z = (y(:, 1:2:end) + y(:, 2:2:end)) / 4;
Categorie
Scopri di più su Interpolation in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!