Hello dear community,
I have some questions about the DSP-Library 3.0 Example of the CFFT for CCS5.
At first I'd like to tell you the actual situation.
In the example, I have included the "t2_SCALE.h", which contains the following 32 DATA (signed int16) values.
#define NX 16
DATA x[2*NX] ={
23773, -2998, /* 0 */
22759, 23573, /* 1 */
-4899, -1857, /* 2 */
21490, -4442, /* 3 */
-24136, 18901, /* 4 */
-8033, 1373, /* 5 */
17096, -16234, /* 6 */
-26758, 9397, /* 7 */
-19714, 18458, /* 8 */
-16227,-26225, /* 9 */
-16448, 9896, /* 10 */
5666, -6580, /* 11 */
-12437, 18113, /* 12 */
-16443, 153, /* 13 */
-26463, 11435, /* 14 */
13472, -3882, /* 15 */
};
Now the functions cfft and cbrev are computed above these values.
cfft(x, NX, SCALE);
cbrev(x,x,NX);
The results are stored in "x" and are almost the same as the comparing-data in "rtest", which is given by Texas Instruments.
DATA rtest[2*NX] ={
-4206, 3068, /* 0 */
6064, -1581, /* 1 */
2009, -3210, /* 2 */
7369, -3740, /* 3 */
161, 5065, /* 4 */
8019, 953, /* 5 */
1238, -5800, /* 6 */
-53, -2434, /* 7 */
-3698, 3896, /* 8 */
-6844, -3103, /* 9 */
4674, 2013, /* 10 */
-2688, -6683, /* 11 */
-387, 1088, /* 12 */
3828, 1291, /* 13 */
2235, 1608, /* 14 */
6045, 4566, /* 15 */
};
So, that is working fine, but I wonder, how to compare these results with Matlab.
In the documentation "spru422j", page 39 is written, that "The C55 DSPLIB cfft results can be compared to the unmodified MATLAB cfft."
But my Matlab Version does not possess a function named "cfft", that's why I used the standart "fft" function.
% Values from t2_SCALE.h
M = [23773, -2998, 22759, 23573, -4899, -1857, 21490, -4442, -24136, 18901, -8033, 1373, 17096, -16234, -26758, 9397, -19714, 18458, -16227, -26225,
-16448,9896, 5666, -6580, -12437, 18113, -16443, 153,-26463, 11435, 13472,
-3882]
% compute fft
Q = fft(M,16);
Unfortunately, my Matlab results do not match with the TI results.
Could you tell me please, what I'm doing wrong? And are you able to generate results with Matlab, which are similar to the "rtest" data?
You would help me a lot.
Thank you very much for your time and your help.
Best regards
Etienne