omega[n_,m_]:=4*Pi*Sin[Pi*m/n];
xi[c_,t_]:=Module[{m},
            n=Length[c];
            Return[Table[c[[m]]*Exp[-I*omega[n,m]*t],{m,n}]];
]            
            
p[c_,t_]:=Module[{x,p},
            x=xi[c,t];
            n=Length[x];
            x=Join[{x[[n]]},Take[x,{1,n-1}]];
            p=Fourier[x,FourierParameters->{-1,1}]*Sqrt[n];
            p=Join[Take[p,{2,n}],{p[[1]]}];
            Return[p];
]
            
c=Join[{1,0.3,0.5,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0},{0}];
n=Length[c];
w1=omega[n,1];
T1=2*Pi/w1;
            
ListPlot[{Re[p[c,0]],Re[p[c,T1*0.1]],Re[p[c,T1*0.2]]},Joined->True,AxesLabel->{"k","pk"}]
c=Join[{0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0.5,0.3,1},{0}];
ListPlot[{Re[p[c,0]],Re[p[c,T1*0.1]],Re[p[c,T1*0.2]]},Joined->True,AxesLabel->{"k","pk"}]
