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.

23 lines
410 B

  1. #include <StormEigen/Dense>
  2. #include <iostream>
  3. using namespace StormEigen;
  4. using namespace std;
  5. int main()
  6. {
  7. ArrayXXf a(3,3);
  8. ArrayXXf b(3,3);
  9. a << 1,2,3,
  10. 4,5,6,
  11. 7,8,9;
  12. b << 1,2,3,
  13. 1,2,3,
  14. 1,2,3;
  15. // Adding two arrays
  16. cout << "a + b = " << endl << a + b << endl << endl;
  17. // Subtracting a scalar from an array
  18. cout << "a - 2 = " << endl << a - 2 << endl;
  19. }