PageRenderTime 19ms CodeModel.GetById 0ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/octave/contract/runme.m

#
MATLAB | 22 lines | 14 code | 8 blank | 0 comment | 1 complexity | 227ee0ac53d4599d66c325c57f80b4cd MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. # file: runme.m
  2. example
  3. # Call our gcd() function
  4. x = 42;
  5. y = 105;
  6. g = example.gcd(x,y);
  7. printf("The gcd of %d and %d is %d\n",x,y,g);
  8. # Manipulate the Foo global variable
  9. # Output its current value
  10. printf("Foo = %f\n", example.cvar.Foo);
  11. # Change its value
  12. example.cvar.Foo = 3.1415926;
  13. # See if the change took effect
  14. printf("Foo = %f\n", example.cvar.Foo);