Hello everybody.(adsbygoogle = window.adsbygoogle || []).push({});

I am triying to calculate a band-pass filter using the fourier transform.

I have a vector with 660 compomponents; one for each month. I am looking for a phenomenon which has a periodicity between 3 and 7 years (it's el niño, on the souhtern pacific ocean). I want to make zero all the coefficients of the fourier transform except the ones which are in between 3 and 7 years. I have tried to remove all of the coefficients which are between the 36th (12*3) and 84th (12*7). Then, I proceed to do the same thing in the other half of the series to mantain simmetry.

But once I make the inverse fourier transform and I plot it, the results don't match whith what I want.

Can someone tell me where is my faliure?

Code used:

niniofourier=fft(ninios);

for i=1:35

niniofourierb(i)=0;

end

for i=85:330

niniofourierb(i)=0;

end

for i=36:84

niniofourierb(i)=niniofourier(i);

end

for i=331:576

niniofourierb(i)=0;

end

for i=577:624

niniofourierb(i)=niniofourier(i);

end

for i=625:660

niniofourierb(i)=0;

end

niniosi=ifft(niniofourierb);

figure(4)

plot (niniosi)

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Question about Fourier transformation in Matlab

Have something to add?

Draft saved
Draft deleted

Loading...

Similar Threads - Question Fourier transformation | Date |
---|---|

Big-O Notation Question | Feb 20, 2018 |

C/++/# Question about input format file (for creating a net) | Dec 13, 2017 |

Latex article template question | Dec 2, 2017 |

C/++/# Question about a specific class method in C++ | Nov 7, 2017 |

[Fortran MKL] FFT quick questions | Jul 13, 2015 |

**Physics Forums - The Fusion of Science and Community**