Low pass filter that removes all the small ripples

4 ビュー (過去 30 日間)
benghenia aek
benghenia aek 2019 年 1 月 26 日
回答済み: Star Strider 2019 年 1 月 26 日
hello
I would like a low pass filter that eliminates all the small ripples of this signal
  1 件のコメント
Adam Danz
Adam Danz 2019 年 1 月 26 日
編集済み: Adam Danz 2019 年 1 月 26 日

サインインしてコメントする。

採用された回答

Star Strider
Star Strider 2019 年 1 月 26 日
I have no idea what signal you want to filter. I assume ‘E’, however ‘E’ does not look the signal you posted.
Try this:
D = load('E.mat');
E = D.E;
N = numel(E); % Vector Length
t = 0 : N-1; % Time Vector (Not Supplied)
Ts = mean(diff(t)); % Sampling Interval
Fs = 1/Ts; % Sampling Frequency
Fn = Fs/2; % Nyquist Frequency
FT_E = fft(E-mean(E))/N; % Fourier Transform
Fv = linspace(0, 1, fix(N/2)+1)*Fn; % Frequency Vector
Iv = 1 : numel(Fv); % Index Vector
figure
plot(Fv, abs(FT_E(Iv))*2)
xlim([0 0.1])
title('Fourier Transform')
Fc = 0.03;
[E_Filt,df] = lowpass(E, Fc, Fs);
figure
plot(t, E_Filt)
title('Filtered Signal')
Look at the ‘Fourier Transform’ plot to decide where you want to put the cutoff frequency (or frequencies, if you decide on a bandpass design instead of a lowpass filter). This code will work with any time vector you want to create for it. You still will have to specify the filter type and cutoffs. If you use the ‘df’ (digitalFilter) output, use the filtfilt function with it to filter your signal.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDigital Filtering についてさらに検索

タグ

タグが未入力です。

Community Treasure Hunt

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

Start Hunting!

Translated by