Rewrite tutorial section on solving linear systems

This commit is contained in:
Jitse Niesen
2009-08-22 20:12:47 +01:00
parent 37dede6077
commit 90735b6a9c
11 changed files with 267 additions and 71 deletions

View File

@@ -0,0 +1,8 @@
Matrix3f A;
Vector3f b;
A << 1,2,3, 0,5,6, 0,0,10;
b << 3, 3, 4;
cout << "Here is the matrix A:" << endl << A << endl;
cout << "Here is the vector b:" << endl << b << endl;
Vector3f x = A.triangularView<UpperTriangular>().solve(b);
cout << "The solution is:" << endl << x << endl;