help-octave
[Top][All Lists]

## Re: drawCircle example

 From: Nicholas Jankowski Subject: Re: drawCircle example Date: Thu, 25 May 2017 12:03:45 -0400

On Thu, May 25, 2017 at 1:14 AM, COhio wrote:
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.
>> h = drawCircle(x0,y0,1);
error: 'x0' undefined near line 1 column 16
>> h = drawCircle(x0,y0,1);
error: 'x0' undefined near line 1 column 16

I've also tried the symbolic package.

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.

Octave is a numerical language, not a general algebra language.  so you can't use variable you haven't yet assigned values to.  x0 undefined means it doesn't exist yet and Octave doesn't know how to drawCircle() with empty information.

try defining x0 and y0 first, then try your command again.

>> x0 = 1; y0 = 2; r = 3;
>> h = drawCircle(x0, y0, r);