MATLAB: Interpolate 3 dimensional arrays (in time and space)

2d interpolation3d interpolationinterpolation

Hi all,
I have 3D matrix 180x90x120 which is equal to lonxlatxtime. In space, the data has 1 degree resolution (e.g. longitude ranges from 1 to 180), while the time interval is 3 hours (e.g. 3h, 6h, 9h…..).
Now I want to interpolate data to get a finer resolution of 0.5 degree and with 1-hour interval, so the new matrix would be 360x180x360.
Could you please help?
Thanks

Best Answer

F=griddedInterpolant(yourData);
qlon=(1:.5:180);
qlat=(1:.5:90);
qtime=(1:1/3:120);
newData=F({qlon,qlat,qtime});