load eeg_plus_noise
b = fir1(64,[59.8 60.2]/Fn,'stop');
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.

  • 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.