How to change the colormap of CWT wavelet transform to dB scale (10log_10(x))
10 ビュー (過去 30 日間)
古いコメントを表示
Yaser Arafath Gulam Dhasthagir
2023 年 4 月 13 日
コメント済み: Yaser Arafath Gulam Dhasthagir
2023 年 4 月 17 日
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 件のコメント
回答 (1 件)
Gokul Nath S J
2023 年 4 月 17 日
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
参考
カテゴリ
Help Center および File Exchange で Continuous Wavelet Transforms についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!