Effacer les filtres
Effacer les filtres

how to use wavelet to deal with complex signal

3 vues (au cours des 30 derniers jours)
evelyn
evelyn le 26 Nov 2023
Commenté : Walter Roberson le 26 Nov 2023
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

Réponses (1)

Walter Roberson
Walter Roberson le 26 Nov 2023
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 commentaire
Walter Roberson
Walter Roberson le 26 Nov 2023
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.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Continuous Wavelet Transforms dans Help Center et File Exchange

Produits


Version

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by