42 const double X[] = {1, 2, 3, 4};
43 const double Y[] = {6, 5, 7, 10};
63 win.plot(
x,
y,
".3r",
"training_points");
68 int main(
int argc,
char** argv)
76 catch (std::exception& e)
78 std::cout <<
"MRPT exception caught: " << e.what() << std::endl;
83 printf(
"Another exception!!");
NUMTYPE leastSquareLinearFit(const NUMTYPE t, const VECTORLIKE &x, const VECTORLIKE &y, bool wrap2pi=false)
Interpolates or extrapolates using a least-square linear fit of the set of values "x" and "y"...
Create a GUI window and display plots with MATLAB-like interfaces and commands.
void normalize(const VEC1 &v, VEC2 &out_v)
Normalize a vector, such as its norm is the unity.
Column vector, like Eigen::MatrixX*, but automatically initialized to zeros since construction...
This base provides a set of functions for maths stuff.
bool loadVector(std::istream &f, std::vector< int > &d)
Loads one row of a text file as a numerical std::vector.
void linspace(T first, T last, size_t count, VECTOR &out_vector)
Generates an equidistant sequence of numbers given the first one, the last one and the desired number...
mrpt::gui::CDisplayWindow3D::Ptr win
Classes for creating GUI windows for 2D and 3D visualization.