TutorialLinAlgSVDSolve.cpp
Go to the documentation of this file.
1 #include <iostream>
2 #include <Eigen/Dense>
3 
4 int main()
5 {
7  std::cout << "Here is the matrix A:\n" << A << std::endl;
9  std::cout << "Here is the right hand side b:\n" << b << std::endl;
10  std::cout << "The least-squares solution is:\n"
11  << A.bdcSvd(Eigen::ComputeThinU | Eigen::ComputeThinV).solve(b) << std::endl;
12 }
Array< int, 3, 1 > b
MatrixXcf A
int main()
static const RandomReturnType Random()
Definition: Random.h:114
The matrix class, also used for vectors and row-vectors.
Definition: Matrix.h:182
@ ComputeThinV
Definition: Constants.h:401
@ ComputeThinU
Definition: Constants.h:397