Frequency axis on a scalogram
Show older comments
Hi, I am trying to plot a scalogram with a time abcisse and a pseudo-frequency axis in a subplot with the time-signal and a spectrogram. Until now it has been possible for me to change the values of the scale-axis, but I cannot get the right values (calculated by hand and by scal2frq) to show on the axis.
Beneath is a cutout from the code for sub plotting the scalogram:
TAB_Sca2Frq = scal2frq(scales,'morl',1/fs); % Calculates pseudo-frequencies
coefs = cwt(signal,scales,'morl'); % Wavelet coefficients % equation: (centfrq('morl')./((scales)*(1/fs)) Sfre = centfrq('morl')./([1:128]*1/fs); % Sfre: Pseudo-frequencies calculated using center frequency for a morlet mother wavelet.
% Calculating the scalogram SCimg = wscalogram('image',coefs,'scales', scales,'ydata',signal);
subplot(312) imagesc(t,TAB_Sca2Frq,SCimg); set(gca,'yticklabel',TAB_Sca2Frq)); % changes the y axis
How can i make sure that the scale-axis has all of the right values (the pseudo-frequencies) from the TAB_Sca2Frq-string?
Hope you can help me!
Thank you
- Katrine
Accepted Answer
More Answers (0)
Categories
Find more on Wavelet Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!