仅供参考,试试
mx = min(x);
Mx = max(x);
s = size(imf);
k = s(1);
M = max(max(abs(imf(1:k-1,:))));
subplot(k/2+1,2,[1,2])
plot(t,x)
axis([t(1) t(s(2)) mx Mx])
set(gca,'YTick',[])
set(gca,'XTick',[])
ylabel(['signal'])
for j = 1:k-1
subplot(k/2+1,2,j+2)
plot(t,imf(j,:))
axis([t(1) t(s(2)) -M M])
set(gca,'YTick',[])
set(gca,'XTick',[])
ylabel(['imf',int2str(j)])
end
subplot(k+1,1,1)
title('Empirical Mode Decomposition')
mr = min(imf(k,:));
Mr = max(imf(k,:));
subplot(k+1,1,k+1)
plot(t,imf(k,:),'r')
axis([t(1) t(s(2)) mr Mr])
set(gca,'YTick',[])
set(gca,'XTick',[])
ylabel('res.')