how to use FFT to filter a 50Hz noise from a data array?
<p>Suppose I have a data array from an ECG like this one</p>

<p><a href="http://joachim.behar.perso.neuf.fr/Joachim/ECG_tuto_1/ECG_filters_basics/ecg_sample.txt" rel="nofollow">http://joachim.behar.perso.neuf.fr/Joachim/ECG_tuto_1/ECG_filters_basics/ecg_sample.txt</a></p>

<p>and I need to filter a 50Hz noise out of it, using an algorithm like that</p>

<p><a href="http://joachim.behar.perso.neuf.fr/Joachim/ECG_tuto_1/ECG_filters_basics/notch_filter.m" rel="nofollow">http://joachim.behar.perso.neuf.fr/Joachim/ECG_tuto_1/ECG_filters_basics/notch_filter.m</a></p>

<p>and the result should be like that ( red - filtered, blue - unfiltered ) seen in <a href="http://joachim.behar.perso.neuf.fr/Joachim/ECG_tuto_1.php" rel="nofollow">Figure 2</a>:</p>

<p><img src="http://i.stack.imgur.com/06ici.png" alt="enter image description here"></p>

<p>What would be the best way of doing it in Java/android? Would this library help <a href="https://sites.google.com/site/piotrwendykier/software/jtransforms" rel="nofollow">https://sites.google.com/site/piotrwendykier/software/jtransforms</a> ?</p>

<p>Thanks! )</p>
