"Bruno Luong" <firstname.lastname@example.org> wrote in message <email@example.com>... > Xr=rand(3,1000); > Vr=rand(1,1000); > > F=TriScatteredInterp(Xr',Vr(:)); > [X Y Z]=ndgrid(linspace(0,1,10),linspace(0,1,10),linspace(0,1,10)); > > F(X,Y,Z) > > % Bruno
How can the interpolation be done in the case that X Y Z are all arrays each having 3 dimensions? I have set up interp3 similarly to Anna, with V, Y, Z being 3-D arrays, but the end result is an 3 dimensional array with all NaNs.
Each array is 41 by 71 x 8 (lat, lon, and height).
The first array contains ozone data. The 2nd array is are the changing vertical levels corresponding with the iozone data. The 3rd array contains pressure levels for a different set of ozone data.
I want to interpolate the first array onto the 3rd array, being mindful of two things 1) in the 2nd array there is a different pressure for each array grid cell (decreasing with height in the 3rd dimension and 2) that in the 3rd array the pressure is only different for each of the 8 layer , in other words its the same horizontally across the array grid for an individual layer.