blob: 5c812cc4c18048c976b7976434ae917f70a564a7 [file] [log] [blame]
Benoit Jacobfabaa692008-12-18 20:36:25 +00001MatrixXd m(3,3);
2m << 1,1,0,
3 1,3,2,
4 0,1,1;
5cout << "Here is the matrix m:" << endl << m << endl;
6LU<Matrix3d> lu(m);
7// allocate the matrix img with the correct size to avoid reallocation
8MatrixXd img(m.rows(), lu.rank());
9lu.computeImage(&img);
10cout << "Notice that the middle column is the sum of the two others, so the "
11 << "columns are linearly dependent." << endl;
12cout << "Here is a matrix whose columns have the same span but are linearly independent:"
13 << endl << img << endl;