continuous wavelet transform without using inbuilt function cwt()

8 ビュー (過去 30 日間)
Monika Gupta
Monika Gupta 2017 年 3 月 12 日
コメント済み: Ameen Bin Obadi 2020 年 5 月 26 日
I need to implement continuous wavelet transform without using the inbuilt function cwt(). here g is complex morlet wavelet. b,a is shift and scale parameter respectively. s(b,a)= 1/a ∫s(t) *g ((t-b)/a) dt
I'm not allowed to use fft. I tried implementing this using convolution, but not getting right results. please help.
if true
%%user CWT
clear all
N=300; %sample point numbers
t=linspace(0,30,N);
%%signal
x=5*sin(2*pi*0.5*t); % signal with freq of 0.5 HZ
%%cwt
fc=1;fb=15;
% psi=((pi*fb)^(-0.5)).*exp(2*1i*pi*fc.*...
% t).*exp(-t.^2/fb);
%%convolution Psi([N-n]/S)*x(n) so we calculate convolution(psi(n/s),x(n))
for s=1:60 %scale vector s=[1:1:60]
for i = 1:N % number of discrete times
for k = 1:i
if ((i-k+1)<N+1) && (k <N+1)
PSI = ((pi*fb)^(-0.5)).*exp(2*1i*pi*fc.*...
(t/s)).*exp(-(t/s).^2/fb);
c(i,s) = c(i)+ x(k)*PSI(i-k+1);
end
end
end
end
end
  3 件のコメント
Ameen Bin Obadi
Ameen Bin Obadi 2020 年 5 月 26 日
I have done it but using different method. I used conv function and it worked. the conv function does the shifting for you so you only need to care about scaling.
Ameen Bin Obadi
Ameen Bin Obadi 2020 年 5 月 26 日
I am now trying to implement it using FFT of signal and FFT of the wavelets then multiplication rather than convolution , but no luck so far.

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeContinuous Wavelet Transforms についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by