level 0 level00x0 level01x4w0

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ;N/2;n++) W[n]=exp( ­I*dcmplx(2.0*PI*n/N,0)); //W8^n } int main() { dcmplx level[4][N]; // See comments below //*** // Two sample inputs, one cosine, one DC. //*** //double x[N]={1,.7071,0, ­.7071, ­1, ­.7071,0,.7071}; //cosine double x[N]={1,1,1,1,1,1,1,1}; // DC. dcmplx W[4]; initW(W); // ********************************************************************** // There are certainly more generic ways to write this and filling in // the blanks is fairly mechanical, but it helps us confirm we actually // have a working scheme and provides some intuition about the amount of // effort involved // ********************************************************************** //*** //Basic idea is to calculate each "line" on the chart at different //spots. So level[X][Y] is horizontal line Y at some vertical location //X on the slide. //*** //level 0 level[0][0]=x[0]; level[0][1]=x[4]*W[0]; level[0][2]=x[2]; level[0][3]=x[6]*W[0]; level[0][4]=x[1]; level[0][5]=x[5]*W[0]; level[0][6]=x[3]; level[0][7]=x[7]*W[0]; //level 1...
View Full Document

Ask a homework question - tutors are online