From: Christian Reiss on
HI all-

I have a three-D array 120*100*100, I wish to interpolate the data along the third dimension so that the end result is a matrix 120*100*199. The third dimension is equally spaced. The ouput array would have interpolated values at points between each of the rows and columns and the original data should not be touched (a simple average of nearest neighbors would be fine).

interp3 works across all elements as aa=interp3(X,3), and doesnt work.

It would be better than what I am thinking (although i am brain dead at this moment)
something like...
for i= 1: length(U-1)

Uaaa=(U(:,:,i)+U(:,:,i+1))/2; % not actually interp.. just element average

U_new=cat(3, U(:,:,i), Uaaa, U(:,:,i+1));...
end

any help would be appreciated

thanks
chris