Hi everyone! I need your help on this.

I have two (three dimensional) arrays. var_1=170x176x360 var_2=194x201x360 I want to resample only the cell size of var_1 to the cell size of var_2 for all 360 months using bicubic method. I tried the following, and it didn’t work.
Var_resampled = resizem(var_1(:,:,i)),[194 201],'bicubic');
Thank you.

4 Kommentare

Geoff Hayes
Geoff Hayes am 8 Feb. 2018
Engdaw - please clarify what you mean by it didn't work. Did you get an error? Or was the result not what you expected? Please clarify...
Engdaw Chane
Engdaw Chane am 8 Feb. 2018
Bearbeitet: Engdaw Chane am 8 Feb. 2018
Hi Geoff Hayes, I was in rush.
I am working on spatial data which have different spatial resolution. The resolutions are 0.5 and o.4 degree. I need to resample from 0.4 by 0.4 degree to 0.5 by 0.5 degree for all 360 months.
The first data with 0.5 degree resolution has 170 rows, 176 columns and 360 months The second data with 0.4 degree resolution has 194 rows, 201 columns and 360 months.
I am trying to change the resolution by changing the number of rows and columns. I tried the following:
Var_resampled = resizem(var_1(:,:,i)),[170 176],'bicubic');
It runs only 170 x 176. The third dimension is disappeared. What I need to get is 170 x 176 x 360.
Or any other option I could use please.
Thank you
Var_resampled(:,:,i) = resizem(var_1(:,:,i)),[170 176],'bicubic');
assuming that you are in for i = 1:size(var_1,3)
Engdaw Chane
Engdaw Chane am 9 Feb. 2018
Walter Roberson, Thank you very much!

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Tags

Gefragt:

am 8 Feb. 2018

Kommentiert:

am 9 Feb. 2018

Community Treasure Hunt

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

Start Hunting!

Translated by