interp2d

From DavinciWiki
Jump to: navigation, search


Description

Bilinear interpolation algorithm for a standard table with a constant delta x and y

Arguments and Return Values

Arguments: A table of values, x (XxYx1) and y (XxYx1) data, delta x and y values, and start x and y

Return Value: a numeric array the size of XxYx1

Usage

Syntax: interp2d(table = VAL [, xdata = VAL] [, ydata = VAL] [, startx = FLOAT] [, deltax = FLOAT] [, starty = FLOAT] [, deltay = FLOAT])

Examples

Setting up the initial values for interpolation (Very simplified example)

dv> table
2x2x1 array of int, bsq format [16 bytes]
0       1
2       3

dv> xdata
2x1x1 array of float, bsq format [8 bytes]
1.500000000     1.500000000

dv> ydata
2x1x1 array of float, bsq format [8 bytes]
1.500000000     1.750000000

First interpolation with deltax and y equal to 1 to illustrate what the algorithm is doing

dv> out = interp2d(table,xdata,ydata,startx=1,deltax=1,starty=1,deltay=1)
2x1x1 array of float, bsq format [8 bytes]
1.500000000     2.000000000

Second interpolation with deltax and y equal to 10 to illustrate how the output changes with changes in deltax and y

dv> out = interp2d(table,xdata,ydata,startx=1,deltax=10,starty=1,deltay=10)
2x1x1 array of float, bsq format [8 bytes]
0.1500000060    0.2000000030


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: 01-10-2008

Personal tools