I cannot post the eeg file since its over 6000 values I just

I cannot post the eeg file since its over 6000 values. I just need help on how to do the procedures.

1. Attached file is an EEG signal, you will use the following function to design a low-pass filter and to filter the EEG signal. function [h] = lowpasstilter(fe, n) fc-0.05 = fe+0.05 f= [O WR WS 11; W a 1 10 0] This function will return an FIR filter with a length of n+1. The argument \'fc is the normalized cutoff frequency with a value range from 0 to 1. 1 corresponds to half the sampling frequency (Fs 2). The sampling frequency, Fs, for the EEG signal, is 100 Hz. Once you designed the filter, compute the convolution of h and the EEG signal as the filtered signal. a). Let n 30, design a low-pass filter with a cutoff frequency of 5 Hz. Use the Matlab built-in function fregz0 to analyze the filter\'s frequency response. Plot the EEG signal before and after the filtering. b). Let n = 61, repeat the tasks in a) c). Design a butterworth filter (cutoff frequency is 10 Hz as well) using the Matlab function butterO and utilizing the Matlab function filter0 to filter the same EEG signal [B, A] = butter(N, fe, \'low); [y] = filter(BAX) Choose the order of the butterworth filter, N, to be 2, and X denotes the EEG raw signal. Use the Matlab function freaz0 to analyze the filter\'s frequency response. Plot the EEG signal before and after the filtering d). Repeat c) by letting N equal to 4 and 8, respectively

Solution

A) First type the function and save the function code in a text file with a .m extension. The name of the file should match the name of the first function in the file.

Call function in the main program h=lowpassfilter(5,30). Once we got h , try to get H in frequency domain

[H,w]=freqz(h,1,512).

Plot(w,abs(H)) ; for Magnitude response and angle(H) for phase response

filtered EEG signal = conv(h,x) x= EEG signal

plot EEG signal and filtered EEG signal using subplot

C) [B,A]=butter(N,fc,\'low\') will give the filter numerator and denomirator expressions

Y= filter(B,A,X) gives the filtered signal , X= EEG signal

Filter response : [H,w]=freqz(B,A,512)

Mag response : plot(w,abs(H))

Phase response plot(w,angle(H)):

Note : b) and d) are repititions of a) and c) respectively so i wont include here

I cannot post the eeg file since its over 6000 values. I just need help on how to do the procedures. 1. Attached file is an EEG signal, you will use the followi

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site