Function InputInterpolation
Defined in File InputInterpolation.h
Function Documentation
-
double InputInterpolation(double x, std::vector<double> xx, std::vector<double> yy, unsigned short int n)
Interpolates the value of an input variable at a given point using linear interpolation. This function assumes that the input values (xx for positions and yy for values) are sorted and corresponds one-to-one. The interpolation formula used is based on the straight-line equation between two points.
- Author
D. Pizzocri
- Author
T. Barani
- Parameters:
x – The point at which we want to interpolate.
xx – Vector of input values representing the x-coordinates at which yy values are defined.
yy – Vector of output values corresponding to each xx value.
n – The total number of points in xx and yy.
- Returns:
The interpolated value at point x.