view examples/code/standalone.cc @ 33632:fed0dc6fd44c default tip

remove unused variable from libgui/module.mk * libgui/module.mk: remove empty variable OCTAVE_GUI_EDITOR_MOC
author Torsten Lilge <ttl-octave@mailbox.org>
date Mon, 27 May 2024 19:42:05 +0200
parents 21f9b34eb893
children
line wrap: on
line source

#include <iostream>
#include <octave/oct.h>

int
main ()
{
  std::cout << "Hello Octave world!\n";

  int n = 2;
  Matrix a_matrix = Matrix (n, n);

  for (octave_idx_type i = 0; i < n; i++)
    for (octave_idx_type j = 0; j < n; j++)
      a_matrix(i,j) = (i + 1) * 10 + (j + 1);

  std::cout << a_matrix;

  return 0;
}