aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/examples/TutorialLinAlgSVDSolve.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'doc/examples/TutorialLinAlgSVDSolve.cpp')
-rw-r--r--doc/examples/TutorialLinAlgSVDSolve.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/examples/TutorialLinAlgSVDSolve.cpp b/doc/examples/TutorialLinAlgSVDSolve.cpp
index c75779d5f..9fbc031de 100644
--- a/doc/examples/TutorialLinAlgSVDSolve.cpp
+++ b/doc/examples/TutorialLinAlgSVDSolve.cpp
@@ -10,6 +10,6 @@ int main()
cout << "Here is the matrix A:\n" << A << endl;
VectorXf b = VectorXf::Random(3);
cout << "Here is the right hand side b:\n" << b << endl;
- JacobiSVD<MatrixXf> svd(A, ComputeThinU | ComputeThinV);
- cout << "The least-squares solution is:\n" << svd.solve(b) << endl;
+ cout << "The least-squares solution is:\n"
+ << A.jacobiSvd(ComputeThinU | ComputeThinV).solve(b) << endl;
}