how can i apply wavelet filter to this code

% generate a waveform
f0 =100;
fs=1000;
pw = 0.1;
pri = 1;
npulses = 100;
s = cos(2*pi*f0*(0:1/fs:pw)); % it can be any other waveform of your choice
s(round(fs*pri)) = 0; % PRI
s = repmat(s, npulses, 1); % npulses
% echo: delayed signal
tau = 0.3;
ntau = round(fs*tau);
amp = 0.5;
e = amp* circshift(s, ntau);
% add noise
sigma = 0.1;
r = s + e + sigma*randn(size(s));
y = pulsint(r);
plot((0:length(s)-1)/fs, r)

답변 (1개)

Mathy
Mathy 2024년 8월 16일
편집: Mathy 2024년 8월 16일

0 개 추천

Hi Mehmet,
To add wavelet filters you can make use of the wfilters (Wavelet filters) by MATLAB. This wfilters( wname) function returns the four lowpass and highpass, decomposition and reconstruction filters associated with the orthogonoal or biorthogonal wavelet wname. For Example
wname = "db5";
%Compute the four filters associated with wavelet name specified by wname and plot the results.
[LoD,HiD,LoR,HiR] = wfilters(wname);
subplot(2,2,1)
stem(LoD)
title("Decomposition Lowpass Filter")
Hope this helps!

카테고리

도움말 센터File Exchange에서 Continuous Wavelet Transforms에 대해 자세히 알아보기

제품

릴리스

R2021a

질문:

2022년 9월 2일

편집:

2024년 8월 16일

Community Treasure Hunt

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

Start Hunting!

Translated by