Template Function mrpt::math::leastSquareLinearFit(const VECTORLIKE1&, VECTORLIKE2&, const VECTORLIKE3&, const VECTORLIKE3&, bool)

Function Documentation

template<class VECTORLIKE1, class VECTORLIKE2, class VECTORLIKE3, int NUM_POINTS = -1>
void mrpt::math::leastSquareLinearFit(const VECTORLIKE1 &ts, VECTORLIKE2 &outs, const VECTORLIKE3 &x, const VECTORLIKE3 &y, bool wrap2pi = false)

Interpolates or extrapolates using a least-square linear fit of the set of values “x” and “y”, evaluated at a sequence of points “ts” and returned at “outs”. If wrap2pi is true, output “y” values are wrapped to ]-pi,pi] (It is assumed that input “y” values already are in the correct range).

See also

spline, getRegressionLine, getRegressionPlane

Note

Implementation in #include <mrpt/math/interp_fit.hpp>

Note

Requires #include <Eigen/Dense>