Introduction
围绕C. Torrence and G. Compo (1998)文章示例辨析小波分析过程。
Data
These include the Nino3 sea surface temperature (SST) used as a measure of the amplitude of the El Nino-Southern Oscillation (ENSO). The Nino3 SST index is defined as the seasonal SST averaged over the central Pacific (5°S-5°N, 90°-150°W, Fig. 1). Data for 1871~1996 are from an area average of the U.K. Meteorological Office GISST2.3.
Fig. 1
示例数据如Fig. 2所示。
Fig. 2
Code Interpreter
归一化
1 2 | variance = std(sst)^2; sst = (sst - mean(sst))/sqrt(variance) ; |
首先,代码将原始数据做归一化处理,归一化并不是必要步骤,这里为方便比较而归一化,公式如下:
\[y = \frac{{x - m}}{s}\]
式中:y是归一化结果;m是x的平均值;s是x的标准差。
小波变换(Wavelet Transform,WT)
1 2 3 4 5 6 7 8 9 10 | n = length(sst); % number of anomaly dt = 0.25 ; % sampling rate time = [0:length(sst)-1]*dt + 1871.0 ; % construct time array xlim = [1870,2000]; % plotting range pad = 1; % pad the time series with zeroes (recommended) dj = 0.25; % this will do 4 sub-octaves per octave s0 = 2*dt; % this says start at a scale of 6 months j1 = 7/dj; % this says do 7 powers-of-two with dj sub-octaves each lag1 = 0.72; % lag-1 autocorrelation for red noise background mother = 'Morlet'; |
参数设定。
References
[1] Torrence, C.; Compo, G.P. A practical guide to wavelet analysis. Bull. Amer. Meteorol. Soc. 1998, 79, 61-78.
No comments:
Post a Comment