0
$\begingroup$
load eeg_plus_noise
Fs=200;
Fn=Fs/2;
b = fir1(64,[59.8 60.2]/Fn,'stop');
figure(3)
freqz(b,1,512,Fs);
y = filter(b,1,eeg_plus_noise);

I am then using the pwelch function to assess if this has removed the 60hz signal.

My understanding of MATLAB is limited because I'm struggling to make use of the signal into the filter properly. I know there is a simpler solution. Am I not instantiating the variables correctly? My plot simply shows the frequency response in phase and magnitude. I'm looking for a filtered out signal with Pwelch. PSD.

$\endgroup$
  • 1
    $\begingroup$ If you run pwelch on the unfiltered signal, and also on the filtered signal, you can compare the power difference at 60 Hz. Is that what you need? $\endgroup$ – MBaz Feb 26 at 17:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.