%INTERPN N-D interpolation (table lookup) for gpuArray
%   Vq = interpn(V,X1q,X2q,X3q,...)
%   Vq = interpn(X1,X2,X3,...,V,X1q,X2q,X3q,...)
%   Vq = interpn(V,X1q,X2q,X3q,...,METHOD)
%   Vq = interpn(X1,X2,X3,...,V,X1q,X2q,X3q,...,METHOD)
%   Vq = interpn(V,X1q,X2q,X3q,...,METHOD,EXTRAPVAL)
%   Vq = interpn(X1,X2,X3,...,V,X1q,X2q,X3q,...,,METHOD,EXTRAPVAL)
%   Vq = interpn(V,NTIMES)
%   Vq = interpn(V) % same as interpn(V, 1)
%   
%   The value argument V must be a double or single N-D array, real or complex. 
%   
%   The grid arguments X1, X2, X3, ... must have the following characteristics:
%     * Same type, double or single.
%     * Finite vectors or N-D arrays with increasing and non-repeating elements in corresponding dimension. 
%     * When X1, X2, X3, ... are N-D arrays, they must align with cartesian axes, as if they were 
%       produced by ndgrid.
%     * Dimensions consistent with those of value V. 
%   
%   The query arguments X1q, X2q, X3q, ... must be vectors or arrays of the same type (double or single). 
%   If X1q, X2q, X3q, ... are arrays, they must be the same size. If they are vectors with different lengths, 
%   one of them must have different orientation.
%   
%   METHOD must be 'linear', 'nearest'.
%   
%   NTIMES currently only supports non-negative real scalars.
%   
%   The extrapolation for the out-of-boundary input is not supported.
%   
%   INTERPN currently supports only up to 5 dimensions.
%   
%   Example:
%    
%      f = @(x,y,z,t) t.*exp(-x.^2 - y.^2 - z.^2);
%      [x,y,z,t] = ndgrid(-1:0.2:1,-1:0.2:1,-1:0.2:1,0:2:10);
%      v = f(x,y,z,t);
%      [xq,yq,zq,tq] = ndgrid(-1:0.05:1,-1:0.08:1,-1:0.05:1,0:0.5:10);
%      vq = interpn(x,y,z,t,gpuArray(v),xq,yq,zq,tq);        
%   
%      % Visualize the function:
%      nframes = size(tq, 4);
%      for j = 1:nframes
%         slice(yq(:,:,:,j), xq(:,:,:,j), zq(:,:,:,j), vq(:,:,:,j),0,0,0);
%         caxis([0 10]);
%         M(j) = getframe;
%      end
%      movie(M); 
%   
%   See also INTERP1, INTERP2, INTERP3, NDGRID, SCATTEREDINTERPOLANT, GPUARRAY.
%   


%   Copyright 2013-2014 The MathWorks, Inc.
