2010-07-24 23:43:07 +08:00
|
|
|
Matrix3f m = Matrix3f::Random();
|
|
|
|
|
Matrix3f y = Matrix3f::Random();
|
|
|
|
|
cout << "Here is the matrix m:" << endl << m << endl;
|
|
|
|
|
cout << "Here is the matrix y:" << endl << y << endl;
|
|
|
|
|
Matrix3f x;
|
|
|
|
|
x = m.colPivHouseholderQr().solve(y);
|
2023-12-06 05:22:55 +08:00
|
|
|
assert(y.isApprox(m* x));
|
2010-07-24 23:43:07 +08:00
|
|
|
cout << "Here is a solution x to the equation mx=y:" << endl << x << endl;
|