I am trying to make a filter by taking a 1D array of voltages and doing a ReFFT() and padding the high frequencies in the array with a value of zero and then going back to time domain with ReInvFFT(). Here is my code which does not seem to be filtering any high frequency content.
lngReturn = frmMain.CWAI1.AcquireData(varData, varBinaryCodes)
frmMain.CWDSP1.ReFFT varData, realdata, imgdata
For i = (UBound(realdata) / 100) To UBound(realdata)
realdata(i) = 0
imgdata(i) = 0
Next
frmMain.CWDSP1.ReInvFFT realdata, imgdata, varData
After the function is done varData has a 1D array of filtered real voltage values. It does not seem to be filtering and I get back exactly what I pass in. I know it must be something simple that I am missing perhaps the variable cannot be used to pass in and then back out the values??
Please shed some light as there are NO examples of this use of FFT.
Thanks