blob: 7323338c37c54abc6d4718c7fd5d1775e2934745 [file] [log] [blame]
Benoit Jacobf04c1cb2008-08-11 21:26:37 +00001typedef Matrix<float,2,3> Matrix2x3;
2typedef Matrix<float,3,2> Matrix3x2;
3Matrix2x3 m = Matrix2x3::Random();
4Matrix2f y = Matrix2f::Random();
5cout << "Here is the matrix m:" << endl << m << endl;
6cout << "Here is the matrix y:" << endl << y << endl;
7Matrix3x2 x;
8if(m.lu().solve(y, &x))
9{
10 assert(y.isApprox(m*x));
11 cout << "Here is a solution x to the equation mx=y:" << endl << x << endl;
12}
13else
14 cout << "The equation mx=y does not have any solution." << endl;
15