computing cwt only at scale 5

10 Ansichten (letzte 30 Tage)
claire
claire am 7 Nov. 2011
I want to compute cwt at scale 5 to detect local maxima at this scale so I did this : cfs = cwt(x,5,'haar'); plot(cfs); Is my program correct or I need to use all scales from 1 to 5?

Akzeptierte Antwort

Wayne King
Wayne King am 7 Nov. 2011
Hi Claire, yes, your code is correct, but are you sure you don't want to include at least a few more scales?
That can help in identifying local maxima lines:
load cuspamax;
x = 1:length(cuspamax);
scales = 1:32;
cfs = cwt(cuspamax,scales,'haar');
[lmaxima,indices] = localmax(cfs,[],false);
[iRow,iCol] = find(lmaxima);
subplot(211);
imagesc(abs(cfs)); axis xy;
axis([1 1024 1 32]);
ylabel('Scale'); title('CWT Coefficients (Moduli)');
subplot(212);
plot(x(iCol),scales(iRow),'marker','o','markerfacecolor',[0 0 1],...
'linestyle','none');
xlabel('Position'); ylabel('Scale'); title('Maxima Lines');
axis([1 1024 1 32]);
  3 Kommentare
Wayne King
Wayne King am 8 Nov. 2011
No, Claire just as an example.
Jean-Luc Bruyelle
Jean-Luc Bruyelle am 9 Jul. 2015
How do we choose the appropriate scales using the same function ?

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Continuous Wavelet Transforms finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by