Hi COhio,

Am 25.05.2017 um 07:14 schrieb COhio:

> Hello,

> I am a beginner with Octave.

> I have successfully installed and loaded the geometry package, but I don't

> know how to draw a simple circle in an effort to review unit circle. Can

> someone provide me with an example. I know I'm missing a fundamental

> concept too.

> Here is what I've tried so far.

>>> pkg load geometry

>>> h = drawCircle(x0,y0,1);

> error: 'x0' undefined near line 1 column 16

It looks like you've never assigned the variable x0 or y0. Use the

editor and type in the following. Then save it as "myscript1.m" and run

it from the GUI with the "execute script" button on top of the editor or

type "myscript" in the interactive commandline:

# add to file "myscript.m"

pkg load geometry

x0 = 2;

y0 = 3;

h = drawCircle (x0, y0, 1);

grid on

# end of file

Lines beginning with # are comments and ignored by the interpreter. If

you want to evaluate an expression wit a variable, it has to been

assigned before. Or you just use constants in the function call like

drawCircle (4,5,6);

which will draw a circle around x=4, y=5 with radius=6.

I would suggest a basic tutorial to get familiar with the language.

> I'm an aspiring middle school math teacher and like Octave because it can

> visualize so much, but it is hard to learn. So, any help is much

> appreciated.

Have you read

https://www.gnu.org/software/octave/doc/interpreter/Simple-Examples.html#Simple-Examples?

-- Andy

_______________________________________________

Help-octave mailing list

[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave