필터 지우기
필터 지우기

code of notch filter

조회 수: 21 (최근 30일)
nsprt nsprto
nsprt nsprto 2013년 11월 12일
댓글: Sumit 2023년 5월 11일
Can any one help me how I can do notch filter in matlab?

답변 (3개)

Jan
Jan 2013년 11월 12일
Isn't this a nice question for an internet search engine?

Honglei Chen
Honglei Chen 2013년 11월 13일
There is an example in the documentation

Kiran
Kiran 2022년 12월 26일
clc
clear all
close all;
load 231m
data1=(val(1,:));
% data=data1/200;
data=(data1-1024)/200;
EKG=data;
% D = load('Sara Cooper ecgNoise.mat');
% EKG = D.DD2; % Signal
L = length(EKG); % Signal Length (samples)
Fs = 300; % Sampling Frequency
Fn = Fs/2; % Nyquist Frequency
t = (0:L-1)/Fs; % Time Vector (sec)
figure(1)
plot(t, EKG)
grid
axis([0 3 ylim])
FTEKG = fft(EKG)/L; % Fourier Transform
Fv = linspace(0, 1, fix(L/2)+1)*Fn; % Frequency Vector
Iv = 1:length(Fv); % Index Vector
figure(2)
semilogy(Fv, abs(FTEKG(Iv))*2)
grid
axis([0 7.5 ylim])
Fs = 300; % Sampling Frequency (Hz)
Fn = Fs/2; % Nyquist Frequency
Wp = [1 100]/Fn; % Passband (Normalised)
Ws = [0.5 110]/Fn; % Stopband (Normalised)
Rp = 10; % Passband Ripple (dB)
Rs = 30; % Stopband Ripple (dB)
[n,Ws] = cheb2ord(Wp, Ws, Rp, Rs); % Chebyshev Type II Order
[b,a] = cheby2(n, Rs, Ws); % Transfer Function Coefficients
[sos,g] = tf2sos(b,a); % Second-Order-Section For Stability
EKG_F = filtfilt(sos, g, EKG);
figure(3)
plot(t, EKG_F)
grid
axis([0 3 ylim])
title('Star Strider’s Bandpass Filtered EKG')
xlabel('Time (sec)')
ylabel('Amplitude (mV?)')
  댓글 수: 1
Sumit
Sumit 2023년 5월 11일
hello, i want design such filter for ECG signal which is in the .wav file. how i do this ?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Smoothing and Denoising에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by