I am using cwt function with 'morl' wavelet. Here is the syntax I am using:
[cwtwavex,freqsx]=cwt(x, scales, 'morl' , 'absglb', dt)
But it seems that there is a bug in the function, because when I choose an impulse function as the input (x), and plot the output in different scales, which should be essentially the wavelets shape, but the output on the last scale is mainly a morlet function modulated with another function!... Here is the code I wrote: clear all;
xlen=1000; Fs=2e4; % sampling frequency
dt=1/Fs; a0 = 2^(1/32); scales = 2*a0.^(0:6*32);
wavex=x; [cwtwavex,freqsx]=cwt(x, scales, 'morl' , 'absglb', dt);
%% figure(1); plot(x);
figure (2); plot(cwtwavex(1,:), 'r') ylabel('cwtx1');
figure (3); plot(cwtwavex(193,:), 'b') ylabel('cwtx193');
But as you see, the shape of the wavelet output on the last scale (193) and also the mesh figure are very strange ( many fluctuations) which would stem from the wrong shape of the morlet wavelet at S(193) (last scale)!!
This problem does not exist when 'sym2' is used! Please help.
Also, it seems that there are lots of limitation when using morlet wavelet with cwt function: it doesn't take 'morl' easily with regular syntax. Please advise.
Thank you very much.