- 积分
- 44
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2014-11-5
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
sst = load('11.txt')
%------------------------------------------------------ Computation
variance = std(sst)^2;
sst = (sst - mean(sst))/sqrt(variance) ;
n = length(sst);
dt =1;
time = (1981:2010);
xlim = [1981,2010];
pad = 1;
dj = 0.1;
s0 = 2*dt;
j1 =fix((log(n*dt/s0)/log(2))/dj);
%lag1 = 0.72;
mother = 'Morlet';
% Wavelet transform:
[wave,period,scale,coi] = wavelet(sst,dt,pad,dj,s0,j1,mother);
power = (abs(wave)).^2 ;
realpart=real(wave);
modulus=abs(wave);
phase=atan2(imag(wave),real(wave));
%------------------------------------------------------ Plotting
% Plot wavelet coefficients of time series
subplot('position',[0.10 0.30 0.80 0.60])
Yticks = 2.^(fix(log2(min(period))):fix(log2(max(period))));
[c,h]=contour(time,((period)),realpart,'-');
clabel(c,h);
xlabel('Time (year)')
ylabel('Period (years)')
%title('a) Morlet Wavelet Real Part of the Temperature Anomaly Series')
set(gca,'XLim',xlim(:))
set(gca,'YLim',log2([min(period),max(period)]), ...
'YDir','default', ...
'YTick',log2(Yticks(:)), ...
'YTickLabel',Yticks)
|
-
|