inverse CWT using coif4
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello,
I have an ECG signal s(t) to be analysed using 'coif4' mother wavelet. My scales are linear from 1 to 10. For each scale, I want to compute the inverse CWT so as to reconstruct my signal s(t) in time-domain from that particular vector containing the wavelet coefficients.
Since, since cwt does not have inverse option and cwtft does not support _'coif4' _wavelet, what is the alternative to achieve my goal?
Please suggest.
0 commentaires
Réponse acceptée
Wayne King
le 13 Juil 2012
Modifié(e) : Wayne King
le 13 Juil 2012
Hi Zozo, I'll give you a couple examples where you reconstruct an approximation to a time-localized 100 Hz component.
But first, I should say the following. Your time- and scale-localized reconstruction of a signal will be better if you use cwtft.m and icwtft.m with logarithmically-spaced scales. The reason for that is that you have to keep in mind the inverse CWT is a single integral approximation to a double integral problem. It turns out that the stability of the reconstruction is better when we use certain scales and for certain wavelets where the Fourier transform has a nice expression. For the coif4 wavelet, that is not the case.
dt = 0.001;
t = linspace(0,1,1000);
x = cos(2*pi*100*t).*(t<0.5)+sin(2*pi*300*t).*(t>=0.75)+0.2*randn(size(t));
scales = 1:30;
cwtcoefs = cwt(x,scales,'coif4');
cwtstruct = struct('wav','coif4','cfs',cwtcoefs,'scales',scales,'meanSIG',mean(x),'dt',dt);
xrec = icwtlin(cwtstruct,'IdxSc',6:8);
plot(t,x,'r-.');
hold on;
plot(t,xrec,'k');
legend('Original Signal','Reconstruction with coif4 wavelet');
%Now using cwtft.m and icwtft.m
s0 = 2*dt;
ds = 0.4875;
NbSc = 20;
wname = 'morl';
sig = {x,dt};
sca = {s0,ds,NbSc};
wave = {wname,[]};
cwtsig = cwtft(sig,'scales',sca,'wavelet',wave);
newcfs = zeros(size(cwtsig.cfs));
indices = 4:6;
newcfs(indices,:) = cwtsig.cfs(indices,:);
cwtsig.cfs = newcfs;
xrec1 = icwtft(cwtsig);
figure;
plot(t,x,'r-.');
hold on;
plot(t,xrec1,'k');
legend('Original Signal','Reconstruction with Morlet Wavelet');
If you compare the two, you'll see that both techniques essentially isolate the 100-Hz component, but that the Morlet wavelet with logarithmically-spaced scales does a better job at the getting the amplitude right.
If you just want to find the localization of the signal feature at certain scales, then the coif4 wavelet works. If you are concerned about an accurate amplitude scaling, then cwtft and icwtft work better than cwt.m paired with icwtlin.m
Hope that helps, Wayne
Plus de réponses (1)
Voir également
Catégories
En savoir plus sur Continuous Wavelet Transforms 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!