TutorialLinAlgSVDSolve.cpp
Go to the documentation of this file.
00001 #include <iostream>
00002 #include <Eigen/Dense>
00003 
00004 using namespace std;
00005 using namespace Eigen;
00006 
00007 int main()
00008 {
00009    MatrixXf A = MatrixXf::Random(3, 2);
00010    cout << "Here is the matrix A:\n" << A << endl;
00011    VectorXf b = VectorXf::Random(3);
00012    cout << "Here is the right hand side b:\n" << b << endl;
00013    cout << "The least-squares solution is:\n"
00014         << A.jacobiSvd(ComputeThinU | ComputeThinV).solve(b) << endl;
00015 }


re_vision
Author(s): Dorian Galvez-Lopez
autogenerated on Sun Jan 5 2014 11:33:29