fftfreq-func
Calculate frequencies for FFT results, the original result is time * data(0,n-1).
vector fftfreq(double time, int n, int side = 1, int shift = 1)
time
n
side
shift
Return frequencies, the size should be either n (for two-sided) or ceil((n+1)/2) (for one-sided).
// Start with a new workbook newbook; // Import the signal data string fname$ = system.path.program$ + "Samples\Signal Processing\fftfilter1.DAT"; impASC fname:=fname$; // Compute the frequencies based on time data in column A int nn = wks.col2.nRows; // Signal data size double time = col(A)[2] - col(A)[1]; // Sampling interval col(C) = fftfreq(time, nn); // One-sided col(D) = fftfreq(time, nn, 2, 1); // Two-sided, shifted
fftc