필터 지우기
필터 지우기

How to change the colormap of CWT wavelet transform to dB scale (10log_10(x))

조회 수: 12 (최근 30일)
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);

답변 (1개)

Gokul Nath S J
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 CenterFile Exchange에서 Continuous Wavelet Transforms에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by