04、eigen库实现插值算法与matlab对比
#include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <algorithm>
#include <stdexcept>
#include <cctype>
#include <Eigen/Dense>
// 禁用特定警告
#pragma warning(disable: 4244) // 'conversion' conversion from 'type1' to 'type2', possible loss of data
#pragma warning(disable: 4146) // unary minus operator applied to unsigned type, result still unsigned
// 定义二维点结构
struct Point2D {
double x, y;
Point2D(double x = 0, double y = 0) : x(x), y(y) {}