How could I remove the noise from a mat file?
The fs is 30 Hz. I tried to use a low pass filter, but seem not work well.
I am not good at programming matlab.
Could you fix my code and explain that?
clear all; load('examples.mat'); n = 57; y = examples(n).data; figure(1) grid on; plot(y); xlabel('Times'); ylabel('Amplitude'); title('Original Noisy Signal'); fs = 30; fpass = 3; yf = lowpass(y, fpass, fs); figure(2) grid on; plot(yf); xlabel('Times'); ylabel('Amplitude'); title('Filtered Signal');
ANSWER
Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.
The problem is that your signal displays broadband noise (readily apparent in the Fourier transform plot), and no freuqency-selective filter is going to have any effect on it. The best you can do is to use wavelets, or the smoothdata function (introduced in R2017a), however your signal resisted my attempts to reduce the noise in the fft using 'sgolay' or any other method.
I post my code in the event you want to experiment with the smoothdata function:
D = load('examples.mat'); data = D.ppg.data; Fs = 30; % Sampling Frequency (Hz) Fn = Fs/2; % Nyquist Frequency (Hz) L = numel(data); t = linspace(0, L, L)/Fs; figure plot(t, data) grid title('PPG Signal') xlabel('Time (s)') ylabel('Amplitude (?)') datam = mean(data); FTdata = fft(data - datam)/L; Fv = linspace(0, 1, fix(L/2)+1)*Fn; % Frequency Vector Iv = 1:numel(Fv); % Index Vector
READ MORE:
https://www.matlabsolutions.com/resources/remove-noise-parts-in-the-signal.php
Comments
Post a Comment