hmm any one can help please? I have a signal that contains some modes in it. I've run a CWT transform but I haven't got my desired results. so I implement a test signal that contains freqs [0.1,0.3,0.6] Hz to see whats the problem with my codes. but the result was accurate. once I change the freqs to [0.1,0.4,0.6] or [0.1,0.5,0.6]Hz,The results wasn't accurate anymore on the plot.

you can see the plot here:

enter image description here

It might be for the damping effect of the 0.6Hz mode or ... I don't know actually :( I think I must fix why this happening first to get my actual signal modes. here's my codes.

Fs=ceil(inv(t(2)-t(1)));                               % sampling freq
     (t<30)+sin(2*pi*t*0.6).*(t<10).*exp(-t*.1);       % my signal[0.1Hz,0.3Hz,0.6Hz] 
wname = 'morl';                                        % define wavelet name
scales = 1:1:128;                                      % scales range
coefs = cwt(x,scales,wname,'lvlabs');                  % Get coefs of x
freq = scal2frq(scales,wname,1/Fs);                    %convert scales to freq range
surf(t,freq,abs(coefs));shading('interp');             % 3D surface plot
axis tight; xlabel('Seconds'); ylabel...               % seting the axis 3D surface
    ('Pseudo-Frequency (Hz)');                         % seting the axis 3D surface
axis([0 length(t)/Fs 0 1 0 max(coefs(:))*1.1])         % seting the axis 3D surface
sc=wscalogram('image',coefs,'scales',freq,'ydata',x);  % get scalograme of x
xlabel('Time'); ylabel('Frequency of gen');            % set axis
hold on
abscof=abs(coefs)';                                    % |coefs|' 
modI=max(abscof);                                      % get  max |coefs| coresponde to freqs of x 
modI=modI/max(modI);                                   % scale each clumn 0-1
plot(freq,modI)                                        % Plot all modes. contain all 
grid on
axis([0 1 0 max(modI)*1.1])                            % seting the axis
xlabel('Pseudo-Frequency (Hz)'); ylabel('abs(coefs)'); % seting the axis

Thanks for your respond.

  • $\begingroup$ Can you please upload the plots somewhere and explain what the problem is graphically? $\endgroup$ – Peter K. Aug 1 '13 at 20:31
  • $\begingroup$ Any idea why that's happened, please? $\endgroup$ – SAH Aug 3 '13 at 14:26
  • $\begingroup$ I am not sure I understand what your question is exactly. Try making your question, VERY, VERY clear, and ask one question at a time. Otherwise it will be very hard to know what you want. $\endgroup$ – Tarin Ziyaee Aug 5 '13 at 16:32
  • $\begingroup$ I think I understand what is the problem in this case, it might be for the bandwidth Fb parameter. cause I have run another test with CmorFb-Fc and by setting the proper (Fb,Fc) I've got accurate output, But I select the Fb,Fc by trial and error procedure.And also it seems I cant change bandwith or center frequency of simple "Morlet" in matlab, $\endgroup$ – SAH Aug 5 '13 at 16:51
  • $\begingroup$ So, 1) are you agree that happened for bandwidth parameter too? <br/> 2) Am I true that its not possible to change Fb,FC for simple "morlet" wavelet in matlab, Unlike Cmor? <br/> 3) Still I don't know how to select Fb and Fc of a signal accurately,any help plz? <br/> $\endgroup$ – SAH Aug 5 '13 at 16:57

Your Answer

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

Browse other questions tagged or ask your own question.