mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
fix LS documentation
This commit is contained in:
@@ -54,10 +54,13 @@
|
|||||||
* constants \f$a,b,c\f$ so that the plane of equation \f$y=ax+bz+c\f$ fits
|
* constants \f$a,b,c\f$ so that the plane of equation \f$y=ax+bz+c\f$ fits
|
||||||
* best the five above points. To do that, call this function as follows:
|
* best the five above points. To do that, call this function as follows:
|
||||||
* @code
|
* @code
|
||||||
|
// create a vector of pointers to the points
|
||||||
|
std::vector<Vector3d> points_ptrs(5);
|
||||||
|
for(int k=0; k<5; ++k) points_ptrs[k] = &points[k];
|
||||||
Vector3d coeffs; // will store the coefficients a, b, c
|
Vector3d coeffs; // will store the coefficients a, b, c
|
||||||
linearRegression(
|
linearRegression(
|
||||||
5,
|
5,
|
||||||
&points,
|
&(points_ptrs[0]),
|
||||||
&coeffs,
|
&coeffs,
|
||||||
1 // the coord to express as a function of
|
1 // the coord to express as a function of
|
||||||
// the other ones. 0 means x, 1 means y, 2 means z.
|
// the other ones. 0 means x, 1 means y, 2 means z.
|
||||||
|
|||||||
Reference in New Issue
Block a user