partly revert last commit: only real input vector get special scaling for dc component
This commit is contained in:
parent
bccaee4821
commit
45e6d319f3
|
|
@ -713,9 +713,7 @@ cx_fft(void *data, short int type, int length, int *newlength, short int *newtyp
|
|||
outdata = alloc_c(fpts);
|
||||
|
||||
scale = (double) fpts;
|
||||
outdata[0].cx_real = out[0][0]/scale/2.0;
|
||||
outdata[0].cx_imag = out[0][1]/scale/2.0;
|
||||
for (i = 1; i < fpts; i++) {
|
||||
for (i = 0; i < fpts; i++) {
|
||||
outdata[i].cx_real = out[i][0]/scale;
|
||||
outdata[i].cx_imag = out[i][1]/scale;
|
||||
}
|
||||
|
|
@ -746,9 +744,7 @@ cx_fft(void *data, short int type, int length, int *newlength, short int *newtyp
|
|||
outdata = alloc_c(N);
|
||||
|
||||
scale = (double) N;
|
||||
outdata[0].cx_real = datax[0]/scale/2.0;
|
||||
outdata[0].cx_imag = datax[1]/scale/2.0;
|
||||
for (i = 1; i < N; i++) {
|
||||
for (i = 0; i < N; i++) {
|
||||
outdata[i].cx_real = datax[2*i]/scale;
|
||||
outdata[i].cx_imag = datax[2*i+1]/scale;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue