blob: 7e629f851ec4c9d55781693812ca9b223a92bdb4 [file] [log] [blame]
Gael Guennebaud41113162009-02-01 20:47:19 +00001typedef Matrix<float,3,3> Matrix3x3;
2Matrix3x3 m = Matrix3x3::Random();
3Matrix3f y = Matrix3f::Random();
4cout << "Here is the matrix m:" << endl << m << endl;
5cout << "Here is the matrix y:" << endl << y << endl;
6Matrix3f x;
7if(m.qr().solve(y, &x))
8{
9 assert(y.isApprox(m*x));
10 cout << "Here is a solution x to the equation mx=y:" << endl << x << endl;
11}
12else
13 cout << "The equation mx=y does not have any solution." << endl;
14