⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 st_inverse_test.m

📁 s变换
💻 M
字号:
% the s-tranform test script
len = 127;
freq = 5;   
t = 0:len-1;

% CREATE the chirp example
chirp = cos(2*pi*(10+t/7).*t/len);
% add a single peak in the spectrum
chirp = chirp + cos(2*pi*(10).*t/len);



[st_matrix_chirp,st_times,st_frequencies] = st(chirp);


% subplot(2,1,1);
% plot(chirp);
% subplot(2,1,2);
% contourf(st_times,st_frequencies,abs(st_matrix_chirp));


% calculate the spectrum for comparison
spe = fft(chirp);
posspe = spe(1:65);


% calculate the inverse ST
% step one: collapse over time to create the complex valued spectrum
st = st_matrix_chirp;

[ts] = inverse_st(st);


 
% plot out stuff
nrows = 6;
subplot(nrows,1,1);
plot(chirp);
title('chirp');


subplot(nrows,1,2);
plot(angle(spe));
title('full fft spe');

subplot(nrows,1,3);
plot(angle(fullstspe));
title('st  full spe');


subplot(nrows,1,4);
plot(abs(spe - fullstspe));
title('abs of difference');


subplot(nrows,1,5);
plot(ts);
title('inverse ST time series');

subplot(nrows,1,6);
plot(ts - chirp);
title('difference between chirp and inverse ST time series (< 10-15 in magnitude)');







⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -