You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
353 B

  1. #include <iostream>
  2. #include <Eigen/Dense>
  3. using namespace std;
  4. using namespace StormEigen;
  5. int main()
  6. {
  7. Matrix3f A;
  8. A << 1, 2, 1,
  9. 2, 1, 0,
  10. -1, 1, 2;
  11. cout << "Here is the matrix A:\n" << A << endl;
  12. cout << "The determinant of A is " << A.determinant() << endl;
  13. cout << "The inverse of A is:\n" << A.inverse() << endl;
  14. }