Bicubic Interpolation
Bicubic2D(vx, vy, Z, p, q)—Returns the bicubic interpolation at (p, q) for the 3D data set defined by two vectors vx and vy, each sorted in ascending order, and by a matrix Z, where Zij corresponds to the value at (vxi, vyj).
The Bicubic2D function is equivalent to using lspline in two dimensions, with no restrictions on the number of rows and columns of the input values. To obtain a value for a new point, Bicubic2D interpolates down each column of the Z matrix, creating a new row. It then interpolates across the new row.
The Bicubic2D function is based on SPLIN2 (p.128) from the book "Numerical Recipes in C, The Art of Scientific Computing" (Cambridge University Press), Copyright (C) 1987, 1988 Numerical Recipes Software, and is used under license.
vx, vy are vectors of real numbers sorted in ascending order.
Z is a matrix of real numbers.
p and q are two real scalars within the ranges of vx and vy respectively.
Was this helpful?