help-octave
[Top][All Lists]

Re: Problems plotting the polygon of n-th complex roots

 From: Christian Kascha Subject: Re: Problems plotting the polygon of n-th complex roots Date: Thu, 31 Oct 2013 18:54:58 +0100 User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.0.1

```

Am 31.10.2013 10:23, schrieb Tobal:
```
```Hi! I'm trying to plot the polygon of x^11=-1 but the polygon isn't drawn
correctly. I suspect the problem is about precision. Here's the code:

n=11;
for k=0:10
x(k+1)=cos(((2*k+1)*pi)/n);
y(k+1)=sin(((2*k+1)*pi)/n);
end

t=0:pi/30:2*pi;
x1=cos(t);
y1=sin(t);

clf();
plot(x,y,'b',x1,y1,'r')

And here is an image:

--
View this message in context:
http://octave.1599824.n4.nabble.com/Problems-plotting-the-polygon-of-n-th-complex-roots-tp4658678.html
Sent from the Octave - General mailing list archive at Nabble.com.
_______________________________________________
Help-octave mailing list
https://mailman.cae.wisc.edu/listinfo/help-octave

```
```Hi,

```
is there any reason, why you do not use the " patch " command? After all, it is made for polygons...
```ATB
Christian

```