main.cpp 392 B

123456789101112131415161718
  1. #include <iostream>
  2. #include <oct.h>
  3. // http://www.dm.unibo.it/~achilles/calc/octave.html/Standalone-Programs.html
  4. int main(void)
  5. {
  6. int n = 2;
  7. Matrix a_matrix = Matrix(n, n);
  8. for (octave_idx_type i = 0; i < n; i++) {
  9. for (octave_idx_type j = 0; j < n; j++) {
  10. a_matrix(i, j) = (i + 1) * 10 + (j + 1);
  11. }
  12. }
  13. std::cout << a_matrix << std::endl;
  14. return EXIT_SUCCESS;
  15. }