Home > Objects > @iData > interp.m

iFit/interp

PURPOSE ^

[b...] = interp(s, ...) : interpolate iData object

SYNOPSIS ^

function b = interp(a, varargin)

DESCRIPTION ^

 [b...] = interp(s, ...) : interpolate iData object

   @iData/interp function to interpolate data sets.

   The multidimensional interpolation is based on a Delauney tessellation 
     using the Computational Geometry Algorithms Library, CGAL.
   This function computes the values of the object 's' interpolated
   on a new axis grid, which may be specified from an other object, as independent axes,
   or as a rebinning of the original axes.
     b=interp(s)    rebin/check 's' on a regular grid.
     b=interp(s, d) where 'd' is an iData object computes 's' on the 'd' axes.
     b=interp(s, X1,X2, ... Xn) where 'Xn' are vectors or matrices as obtained 
                    from ndgrid computes 's' on these axes.
     b=interp(s, {X1,X2, ... Xn}) is similar to the previous syntax
     b=interp(s, ..., ntimes) where 'ntimes' is an integer computes new axes for 
                    interpolation by sub-dividing the original axes ntimes.
                    we also recommend the 'resize' method (much faster).
     b=interp(s, ..., 'method') uses specified method for interpolation as one of
                    linear (default), spline, cubic, or nearest
     b=interp(s, ..., 'grid') uses meshgrid/ndgrid to determine new axes as arrays
   Extrapolated data is set to NaN for the Signal, Error and Monitor.
   For Event data sets, we recommend to use the 'hist' method which is much faster.

 input:  s: object or array (iData)
         d: single object from which interpolation axes are extracted (iData)
            or a cell containing axes d={X1,X2, ... Xn}               (cell)
         X1...Xn: scalar, vectors or matrices specifying axis for 
            dimensions 1 to ndims(s) (double scalar/vector/matrix)
         ntimes: original axis sub-division (integer)
 output: b: object or array (iData)
 ex:     a=iData(peaks); b=interp(a, 'grid'); c=interp(a, 2);

 Version: Aug. 22, 2017
 See also iData, interp1, interpn, ndgrid, iData/setaxis, iData/getaxis,
          iData/hist, iData/resize, iData/reshape

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Tue 22-Aug-2017 11:03:30 by m2html © 2005. iFit (c) E.Farhi/ILL EUPL 1.1