cinterp

From DavinciWiki
Jump to: navigation, search


Description

Point interpolation algorithm which can be used to resample data to a new set of x values using cubic spline interpolation.

Same as interp().

NOTE: The X value must be monotonically increasing. Or more simply, the next number must be larger than the previous number in an array.

Arguments and Return Values

Arguments: An X and Y numerical array pair and a new X numerical array.

Return Value: A numerical array of Y values which is resampled to the new X numerical array

Usage

Syntax: interp(y1 = VAL, x1 = VAL, x2 = VAL [,ignore = VAL] )

y1      - a set of Y values that correspond to the original or from X values
x1      - a set of X values that correspond to the object Y values
x2      - the new set of X values which will be the resampling source data
ignore  - ignore value 

Examples

dv> original
struct, 2 elements
   data: 1x1x1000 array of float, bsq format [4,000 bytes]
   xaxis: 1x1x1000 array of float, bsq format [4,000 bytes]

dv> new_xaxis
1x1x50 array of float, bsq format [200 bytes]

dv> interpolated_data = cinterp(original.data, original.xaxis, new_xaxis) 
1x1x50 array of float, bsq format [200 bytes]

Images

interp.png

DavinciWiki Mini-Nav Bar

Contents


Contact Developers

  • davinci-dev [AT] mars.asu.edu

All other topics

  • See navigation on the left

Related Functions

Recent Core Changes

Modified On: 02-22-2008

Personal tools