I would like to know, in the program I enter with 10 values, and the program calculates the discrete transform of the cosine-II, using this sequence of 10 numbers:
3
5
7
9
7
5
3
5
8
9
Why the first value of 30.000000 and not 61.000000 ??
Here is the code snippet with the account:
for(i = 0; i < N; i++)
{
DCT = 0;
for(j = 0; j < N; j++)
{
DCT += vetor[i] * cos((PI/N * (j + 0.5) )* i); //Formula da transformada discreta do cosseno
}
printf("%lf\n", DCT);
}