www.gusucode.com > wavelet 源码程序 matlab案例代码 > wavelet/ScalesToFrequenciesExample.m
%% Scales To Frequencies % Construct a vector of scales with 10 voices per octave over five octaves. % Assume the data are sampled at 10 kHz. % Copyright 2015 The MathWorks, Inc. voicesperoctave = 10; numoctaves = 5; a0 = 2^(1/voicesperoctave); Fs = 1e4; scales = ... a0.^(voicesperoctave:1/voicesperoctave:numoctaves*voicesperoctave); %% % Convert the scales to approximate frequencies in hertz for the Morlet % wavelet. Frq = scal2frq(scales,'morl',1/Fs); %% % Determine the corresponding periods. Construct a table with the scales, % the corresponding frequencies, and periods. Display the smallest 20 % scales along with their corresponding frequencies and periods. Frq = Frq(:); scales = scales(:); T = [scales.*(1/Fs) Frq 1./Frq]; T = array2table(T,'VariableNames',{'Scale','Frequency','Period'}); T(1:20,:)