/trunk/Examples/octave/contract/runme.m
# · MATLAB · 22 lines · 14 code · 8 blank · 0 comment · 1 complexity · 227ee0ac53d4599d66c325c57f80b4cd MD5 · raw file
- # file: runme.m
- example
- # Call our gcd() function
- x = 42;
- y = 105;
- g = example.gcd(x,y);
- printf("The gcd of %d and %d is %d\n",x,y,g);
- # Manipulate the Foo global variable
- # Output its current value
- printf("Foo = %f\n", example.cvar.Foo);
- # Change its value
- example.cvar.Foo = 3.1415926;
- # See if the change took effect
- printf("Foo = %f\n", example.cvar.Foo);