www.gusucode.com > wavelet 源码程序 matlab案例代码 > wavelet/CWTofKobeEarthquakeDataExample.m
%% Continuous Wavelet Transform of Earthquake Data % Obtain the CWT of Kobe earthquake data. The sampling frequency is 1 Hz. load kobe; %% % Plot the earthquake data. plot((1:numel(kobe))./60,kobe); xlabel('mins'); ylabel('nm/s^2'); grid on title('Kobe Earthquake Data'); %% % Obtain the CWT, frequencies, and cone of influence. [wt,f,coi] = cwt(kobe,1); %% % Plot the data, including the cone of influence. cwt(kobe,1); %% % Obtain the CWT, time periods, and cone of influence by specifying a % time duration instead of a sampling frequency. [wt,periods,coi] = cwt(kobe,minutes(1/60)); %% % View the same data by specifying a sampling period input instead of a % frequency. cwt(kobe,minutes(1/60));