This experiment is based on a question at the Lab Exam (EN1093).
According to the following difference equation which relates output (y[n]) and input (x[n]) we were asked to derive the transfer function H(z). This filter removes the 50Hz noise component.
download the ECG Signal distorted with noise
MATLAB code to implement the Notch Filter with the above characteristics
Implementation output ->
For Further reading: