ECG signal artifact removing .
16 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have ECG signal has .mat extension I want to make good Baseline wander artifact removing by code, I know how to make it by fdatool , I just want it by codes to enhance it more ?
0 commentaires
Réponse acceptée
Star Strider
le 2 Nov 2017
Try this:
Fs = 1000; % Sampling Frequency (Hz)
Fn = Fs/2; % Nyquist Frequency (Hz)
Wp = [1.1 100]/Fn; % Passband Frequency (Normalised)
Ws = [0.1 101]/Fn; % Stopband Frequency (Normalised)
Rp = 1; % Passband Ripple (dB)
Rs = 150; % Stopband Ripple (dB)
[n,Ws] = cheb2ord(Wp,Ws,Rp,Rs); % Filter Order
[z,p,k] = cheby2(n,Rs,Ws); % Filter Design
[sosbp,gbp] = zp2sos(z,p,k); % Convert To Second-Order-Section For Stability
figure(3)
freqz(sosbp, 2^16, Fs) % Filter Bode Plot
filtered_signal = filtfilt(sosbp, gbp, original_signal); % Filter Signal
Tweak the filter characteristics (most notably ‘Fs’ to be appropriate to your signal) to get the result you want. The sampling frequency ‘Fs’ is ideally above 250 Hz to use this filter.
8 commentaires
Star Strider
le 3 Nov 2017
It would help to know the complete text of the error message.
You cannot use ‘*****’ for your original (unfiltered) signal. You have to import it into your workspace (read it from the file), give it a variable name, and then supply that variable name to the filtfilt function to filter it.
See the documentation on Data Import and Analysis (link) and Supported File Formats for Import and Export (link) for a list of the functions you can use to import your data, depending on the file format it is currently in.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Single-Rate Filters dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!