i have a problem in this code of band passing a EEG SIGNAL 8-30 hz ? can you find the error ? give a solution to this ? i have used butterworth filter ? is it a IIR FILTER OR FIR FILTER ? in the below code sampling freq =250 ,x is dataset.
1 view (last 30 days)
Show older comments
x=train_data('1,:,1'); Fs=250; Ts=1/Fs; % z_1=m*Ts; % z_2=ceil(m*Ts); t=0:Ts:3.999; t=t'; Fn=Fs/2; % Stopband Frequency (Normalised) Wp = [8 30]/Fn; Ws = [7.8 31]/Fn; Rp = 3; Rs = 40; [n,Wn] = buttord(Wp,Ws,Rp,Rs); [z,p,k] = butter(n,Wn); sos = zp2sos(z,p,k); filtered_signal = filtfilt(sos,x); figure,plot(t,filtered_signal);%
0 Comments
Answers (0)
See Also
Categories
Find more on Biomedical Signal Processing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!