how do i run my signal through a filter i designed with filter design tool
이전 댓글 표시
Hi. I am novice matlab user. I have what my be a simple question to more experienced users.
I am trying to remove the dc offset(0.16hz) from an eeg signal. Having constructed a high pass filter in the filter designer toolbox, i have generated mablab code and inserted in to my .m file.
my question is how do i pass my signal through it, so that i may plot my results.
Thanks
Code below :
load nikita2.mat nik= nikita (:,3);
%*function Hd = nikitaHighPass Fs = 128; % sampling frequency N = 1; % Order Fc = 0.16; % Cutoff Frequency
% Construct an FDESIGN object and call its BUTTER method. h = fdesign.highpass('N,F3dB', N, Fc, Fs); Hd = design(h, 'butter', 'FilterStructure', 'df1sos');
% Question how do i get the matrix 'nik' through the filter so that i can create figures?
figure; plot(h,'nik'); h_legend=legend('AF3'); set(h_legend,'FontSize',14); title('NIKITA' offset 0.16HZ removed]','FontWeight','bold'); xlabel('Time / 128 samples per second'); ylabel('microVolts');
답변 (1개)
Honglei Chen
2012년 7월 11일
Please format your code in your question. I'm not sure what you mean by
plot(h,'nik')
but if you want to filter the signal, nik, you can do
y = filter(Hd,nik)
카테고리
도움말 센터 및 File Exchange에서 Filter Analysis에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!