Hello all,

I would appreciate if someone can please help with this coding problem - it is 
detailed in the code itself.


Thanks in advance


/////////////////////////////////////////////
pi = 3.14;
cosinepart[0] = 0;
WindowSize = 50;
Maxpwr = 0; 
x = BarIndex(); 

for( period = 8; period <= WindowSize; period++ ) 
{ 
   tx = 2 * pi * x / period; 

   cosinepart = Sum( C * cos( tx ), WindowSize ); 

/*      // I need to remove the Sum function above
        //so this is what I coded but why doesn't it work ??
        for(i = 0 ; i<Windowsize ; i++)
        {
                cosinepart[period] += (  C[i]*cos(tx[i])  )  ;
        }
*/

} 

Plot(cosinepart,"",colorRed,styleLine);
//////////////////////////////////////////////

Reply via email to