Function lupnt::LinearInterp2d

Function Documentation

double lupnt::LinearInterp2d(const VecXd &x, const VecXd &y, const MatXd &z, double xi, double yi)

Linear interpolation in 2D.

Bilinear interpolation of a 2D tabulated function z(x, y) at point (ix, iy).

Used by Antenna::ComputeGain to look up a 2D antenna gain pattern as a function of boresight angle (phi) and azimuth (theta).

Parameters:
  • x – Vector of x values

  • y – Vector of y values

  • z – Matrix of z values

  • xi – x interpolation point

  • x – Strictly monotonic table of samples along the first axis (rows of z)

  • y – Strictly monotonic table of samples along the second axis (columns of z)

  • z – Table of values, size x.size() x y.size()

  • ix – Query point along x; must lie within [x(0), x(end)] (within EPS)

  • iy – Query point along y; must lie within [y(0), y(end)] (within EPS)

Returns:

Bilinearly interpolated value of z at (ix, iy)