let us consider following code

function [sca_1,sca_2,sca_3,sca_4]=calc_wavelet(y,wname,scales,freq,fs)
%y-input signal
%wname-wavelet basis name
%freq-test frequencies
%fs-sampling rate
TAB_Sca2Frq = scal2frq(scales,wname,1/fs);
[~,idxSca_1] = min(abs(TAB_Sca2Frq-freq(1)));
sca_1 = scales(idxSca_1);
[mini,idxSca_2] = min(abs(TAB_Sca2Frq-freq(2)));
sca_2 = scales(idxSca_2);
[~,idxSca_3] = min(abs(TAB_Sca2Frq-freq(3)));
sca_3 = scales(idxSca_3);
[mini,idxSca_4] = min(abs(TAB_Sca2Frq-freq(4)));
sca_4 = scales(idxSca_4);
coefs = cwt(y,scales,wname);
clf; wscalogram('image',coefs,'scales',scales,'ydata',y);
hold on
plot([1 size(coefs,2)],[sca_1 sca_1],'Color','m','LineWidth',2);
plot([1 size(coefs,2)],[sca_2 sca_2],'Color','m','LineWidth',2);
plot([1 size(coefs,2)],[sca_3 sca_3],'Color','m','LineWidth',2);
plot([1 size(coefs,2)],[sca_4 sca_4],'Color','m','LineWidth',2);

i have took following data

>> wname = 'morl';
scales = 1:1:128;
>> fs=100;
>> freq=[13.7   10.5    29.9    31

when i run following code


got result :

enter image description here

one frequency is lost,i have tried also following basis

>> wname = 'mexh';
>> wname = 'morl';
>> wname = 'haar';
>> wname = 'gaus4';

please pay attention that my model is following


so which wavelet basis should i choose for good spectral resolution?i want to use wavelet for ability to distinguish signals which are closed spaced to each other,like in my case

freq=[13.7 10.5 29.9 31];

it could be even more closed to each other


The window shape chosen for your wavelet basis will generally only have a slight effect on frequency resolution. To increase frequency resolution more, increase a scale factor that is related or proportional to the window length for a given frequency. This will also decrease temporal resolution.

| improve this answer | |
  • $\begingroup$ i have tried to increase scales,but it seems that wavelet also have same problem of resolution as generally windows,,is it right? $\endgroup$ – dato datuashvili Apr 12 '14 at 20:56
  • $\begingroup$ in fact when we have unknow frequency components,it always big question how big scales should i choose?as it is related to AR model :How big model order should i choose $\endgroup$ – dato datuashvili Apr 12 '14 at 20:58
  • $\begingroup$ DFT windows have more problems with resolution than wavelet scale, but the problem they have in common are similar. $\endgroup$ – hotpaw2 Apr 12 '14 at 21:00
  • $\begingroup$ especially for sinusoidal models in noise,so that means that there is not standard base or scales related to wavelet to such models? $\endgroup$ – dato datuashvili Apr 12 '14 at 21:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.