Hello,
On Monday 25 October 2004 16:36, Kamaraju Kusumanchi wrote:
> Hi
> Could someone help me with the following simple problem. I cannot
> figure out where I should look for in the documentation regarding this.
> Tried reading the documentation on array, functions etc., But none of
> them talk about how to declare an 'elemental function'.
>
> I want to declare an array whose values are
>
> cos(%PI/N), cos(2*%PI/N), cos(3*%PI/N) ..... cos(N*%PI/N)
>
> I tried this
>
> i : [1,2,3,4,5,6,7,....,N]
Perhaps the following will help. Look at describe(makelist) or describe(map).
makelist(cos(i*%pi/10),i,1,10) or alternatively
map(cos,[1,2,3,4,5,6,7,....,N]*%pi/N) where N is fixed
rgds,
Valery