00001 Matrix<float,2,3> m = Matrix<float,2,3>::Random(); 00002 Matrix2f y = Matrix2f::Random(); 00003 cout << "Here is the matrix m:" << endl << m << endl; 00004 cout << "Here is the matrix y:" << endl << y << endl; 00005 Matrix<float,3,2> x = m.fullPivLu().solve(y); 00006 if((m*x).isApprox(y)) 00007 { 00008 cout << "Here is a solution x to the equation mx=y:" << endl << x << endl; 00009 } 00010 else 00011 cout << "The equation mx=y does not have any solution." << endl;