ifft: in case input array is smaller then output array - fill in the rest with zero to prevent uninitialzed plot variables
This commit is contained in:
parent
e83fae11bc
commit
4c4a9c78ec
|
|
@ -940,6 +940,10 @@ cx_ifft(void *data, short int type, int length, int *newlength, short int *newty
|
|||
in[i][0] = indata[i].cx_real;
|
||||
in[i][1] = indata[i].cx_imag;
|
||||
}
|
||||
for (i = length; i < tpts; i++) {
|
||||
in[i][0] = 0.0;
|
||||
in[i][1] = 0.0;
|
||||
}
|
||||
|
||||
plan_backward = fftw_plan_dft_1d(tpts, in, out, FFTW_BACKWARD, FFTW_ESTIMATE);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue