How to change the colormap of CWT wavelet transform to dB scale (10log_10(x))
10 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Yaser Arafath Gulam Dhasthagir
il 13 Apr 2023
Commentato: Yaser Arafath Gulam Dhasthagir
il 17 Apr 2023
Hello, I plotted my data using wavelet transform with Morlet as mother wavelet and i got the plot of time vs frequency with the energy as the colormap. I was wondering if I could chnage the color map to dB scale (10*Log10(x)). Can anyone help? Also the current frequency scale is in log scale. How can i change it to linear scale?
I attached the plot. The below is the code used.
%Compute scalogram
%Parameters
sampleRate = Fs;
wavelet = 'amor';
%Compute time vector
t = 0:1/sampleRate:(length(D1)*1/sampleRate)-1/sampleRate;
%Compute CWT
%If necessary, substitute workspace variable name for D4 as first input to cwt() function in code below
%Run the function call below without output arguments to plot the results
[waveletTransform,frequency] = cwt(D1, sampleRate, wavelet);
scalogram = abs(waveletTransform);
0 Commenti
Risposte (1)
Gokul Nath S J
il 17 Apr 2023
Hi Yaser Arafath Gulam Dhasthagir,
Based on my understanding, it seems that you want to change the colormap of the CWT wavelet transform to dB scale.
The colormap can be converted to dB scale by using the following code.
cwt(D1, sampleRate, wavelet);
ax = gca;
ax.ColorScale = "log";
For further information, kindly refer the following link.
with regards,
Gokul
Vedere anche
Categorie
Scopri di più su Continuous Wavelet Transforms in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!