1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
using namespace std;
#include <iostream>
#include <string>
#include "LinearInterp.hh"
int main()
{
double xvec[] = {1.85, 2.15, 2.45, 2.75, 3.05, 3.35, 3.65, 3.95,
4.25, 4.55, 4.85, 5.15, 5.45, 5.75, 6.05, 6.35,
6.65, 6.95, 7.25, 7.55, 7.85, 8.15};
double yvec[] = {49.80, 39.66, 31.43, 24.79, 19.45, 15.19, 11.80, 9.12,
7.01, 5.35, 4.06, 3.06, 2.28, 1.67, 1.21, 0.85,
0.58, 0.38, 0.23, 0.13, 0.06, 0.03};
double y_interp = LinearInterp::LinearInterpFunc(xvec,yvec,2.46);
cout << y_interp << endl;
return 0;
}
|