没有错误提示,程序运行正常,就是图像出不来。
200710070016ZHP.txt
(6.23 KB, 下载次数: 35)
Gs(ZHPUD).txt
(189 Bytes, 下载次数: 33)
x=load('200710070016ZHP.txt');
x1=detrend(x,'linear');
fs=100;
n=length(x);
t=0:1/fs:(n-1)/fs;
t=t';
nfft=2^nextpow2(n);
%FFT变换
S=fft(x1,nfft);
g=load('Gs(ZHPUD).txt');
G=fft(g,nfft);
G=G';
D=S./G;
%IFFT变换
y=ifft(D,nfft);
y=real(y(1:n));
y1=cumtrapz(y);
y1=y1';
WinLen = 10;
t=t';
[WT, FreqBins, Scales] = CWT_Morlet(y1,WinLen,1024);
FreqBins = FreqBins * fs;
Pyy=abs(WT).^2;
waterfall(t,FreqBins,Pyy); %三维谱图
colormap jet; |