source: pacpussensors/trunk/Vislab/lib3dv-1.2.0/lib3dv/eigen/doc/snippets/FullPivLU_solve.cpp

Last change on this file was 136, checked in by ldecherf, 8 years ago

Doc

File size: 413 bytes
Line 
1Matrix<float,2,3> m = Matrix<float,2,3>::Random();
2Matrix2f y = Matrix2f::Random();
3cout << "Here is the matrix m:" << endl << m << endl;
4cout << "Here is the matrix y:" << endl << y << endl;
5Matrix<float,3,2> x = m.fullPivLu().solve(y);
6if((m*x).isApprox(y))
7{
8 cout << "Here is a solution x to the equation mx=y:" << endl << x << endl;
9}
10else
11 cout << "The equation mx=y does not have any solution." << endl;
Note: See TracBrowser for help on using the repository browser.