Is there a way to compute the n-point fft of an 1D array in MKL (C-language, Linux) for an arbitrary number of n? The problem is that i need to translate the matlab function fft(X,N) to use with the MKL-lib. The function inside matlab is described as : "fft(X,N) is the N-point fft, padded with zeros if X has less than N points and truncated if it has more." (see ref.)
As an example, lets say i have a: Input vector, I_vec, with size of 100 (can vary from 1 to 1500) elements and a output vector, O_vec, with size of 2048 (can vary between the fifth closest power of 2 of input vec). I want to compute the values on these 100 elements to "fill up" the 2048 (1D) vector. Let's say that i have computed the values by the DftiComputeForward. I am then expecting the output to be: inplace fft for I_vec: I_vec = 0.1, i_vec = 0.2, .... out of place fft for I_vec to O_vec: O_vec = 0.1 ... O_vec[~10] = 0.15 ... O_vec[~20] = 0.2.
Is this possible? I have tried to read the reference document and looked at the examples - but cant find anything that does this kind of computation straight away. Maybe do a number of transformations and try to pad inside the vector? If you have any tips to where to look or can give an example of how to do this, it would be highly appreciated.