help-octave
[Top][All Lists]

## Re: drawCircle example

 From: Doug Stewart Subject: Re: drawCircle example Date: Thu, 25 May 2017 13:46:10 -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.

try this as an example

drawCircle(0,0,1)
hold on
for k=0:5
x=sin(k*2*pi/6)
y=cos(k*2*pi/6)
r=1
drawCircle(x,y,r)
endfor

for k=0:5
x=2*sin(k*2*pi/6)
y=2*cos(k*2*pi/6)
r=1
drawCircle(x,y,r)
endfor