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.
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Biomedical Signal Processing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!