how to use wavelet to deal with complex signal

3 次查看(过去 30 天)
when I use wavelet to deal with complex signal (20000*1), I get a matrix named cfs (137*20000*2) which has the third dimension.
what is the third dimension mean? the different between cfs(:,:,1) and cfs(:,:,2) is?
why the first dimension is 137?
signal = randn(20000,1)+ 1i*randn(20000,1);
data_length = length(signal);
Fs =1000;
fb = cwtfilterbank('SignalLength',data_length, ...
'SamplingFrequency',Fs,...
'VoicesPerOctave',12);
[cfs,frq] = wt(fb,signal.');
figure;
t = (1:1:data_length)*1/Fs;
pcolor(t,frq,abs(cfs(:,:,1)));
set(gca,"yscale","log");
shading interp;
axis tight;
title("Scalogram");
xlabel("Time (s)");
ylabel("Frequency (Hz)");
figure;
pcolor(t,frq,abs(cfs(:,:,2)));
set(gca,"yscale","log");
shading interp;
axis tight;
title("Scalogram");
xlabel("Time (s)");
ylabel("Frequency (Hz)");
[m,n] = size(signal)
m = 20000
n = 1
[m,n,l] = size(cfs)
m = 137
n = 20000
l = 2

回答(1 个)

Walter Roberson
Walter Roberson 2023-11-26
toolbox/wavelet/wavelet/@cwtfilterbank/wt.m
% If X is complex-valued, CFS is a 3-D
% matrix, where the first page is the CWT for the positive
% scales (analytic part or counterclockwise component) and
% the second page is the CWT for the negative scales
% (anti-analytic part or clockwise component).
  1 个评论
Walter Roberson
Walter Roberson 2023-11-26
why the first dimension is 137?
There are some complicated calculations to determine proper cutoff frequencies, and the cutoff frequency is used to compute the number of octaves, and then that is used to calculate scales from 0 to number of octaves times number of voices ... which comes out as 137 in this particular case.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Continuous Wavelet Transforms 的更多信息

产品


版本

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by