- 积分
- 8793
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2011-9-14
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
clear;
load zhunian.txt
sst = zhunian;
%------------------------------------------------------ Computation
variance = std(sst)^2;
sst = (sst - mean(sst))/sqrt(variance) ;
n = length(sst);
dt =1/1;
time = [0:length(sst)-1]*dt + 1960.0 ;
xlim = [1960,2001];
pad = 1;
dj = 1/4;
s0 = 2*dt;
j1 =fix((log(n*dt/s0)/log(2))/dj);
lag1 = 0.32;
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])
levels = [1,2,4,8,16] ;
%level1 = [0,2,4,8];
v=[0,1,2,4];
Yticks = 2.^(fix(log2(min(period))):fix(log2(max(period))));
[c,h]=contour(time,log2(period),realpart,log2(levels),'-');
%[c,h]=contour(time,log2(period),realpart,level1,'k-');
clabel(c,h,v);
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)
hold on
levels = [0.0625,0.125,0.25,0.5,1] ;
%level1=[-8,-4,-2,0];
v=[-2,-4];
[c,h]=contour(time,log2(period),realpart,log2(levels),':');
%[c,h]=contour(time,log2(period),realpart,level1,'k:');
clabel(c,h,v);
hold off
我现在想把图(无阴影)的图修改成有阴影的,无阴影的图值只有0,1,2,怎样能改成每隔0.2显示一条等值线?请高手们指导一下
|
-
-
|