FFT and IFFT: Change the values of complex number

1 view (last 30 days)
Hi everyone,
I am in the midst of analyzing a time series data of tidal current speed.
I have performed FFT analysis on the data and would like to change few of the complex number values at certain time steps to zero. However, upon changing the complex number to zero, when I perform an IFFT, it return a complex double values instead of double values of speed.
Any clue what causes this? What is the correct way to change complex number to 0+0i?
What I am trying to do here is to remove the tidal constituent from the current speed data and keep the non - harmonic residual speed time series.
Thanks.
Jack

Accepted Answer

Star Strider
Star Strider on 1 Apr 2015
I am not quite certain what you are doing. The fft of a time series presents data as amplitudes at each frequency. If you want to have the amplitudes at specific frequencies (not time steps) to be zero (which is what it seems that you are doing), it is necessary to filter your time series data with a ‘notch’ or ‘bandstop’ digital filter. This is not difficult to design (with the Signal Processing Toolbox). You have to have regularly-sampled data, and know what the sampling interval (‘Ts’) or sampling frequency (‘Fs’) are.
  8 Comments
Jack Vun Zac Lee
Jack Vun Zac Lee on 3 Apr 2015
Thank you for the hard works. I will give it a try!

Sign in to comment.

More Answers (1)

Honglei Chen
Honglei Chen on 1 Apr 2015
Most likely you didn't maintain the symmetry when you setting this to zero. It would be helpful if you show the snippet where you set the spectrum to 0.
  1 Comment
Jack Vun Zac Lee
Jack Vun Zac Lee on 3 Apr 2015
Thank you for the feedback. What do you mean by setting the symmetry to zero?

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!