hlayumi的个人空间 https://blog.eetop.cn/hslogic [收藏] [复制] [分享] [RSS]

空间首页 动态 记录 日志 相册 主题 分享 留言板 个人资料

日志

S变换

已有 3781 次阅读| 2019-3-30 12:11 |系统分类:芯片设计| FPGA

% 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)');


点赞

评论 (0 个评论)

facelist

您需要登录后才可以评论 登录 | 注册

  • 关注TA
  • 加好友
  • 联系TA
  • 0

    周排名
  • 0

    月排名
  • 0

    总排名
  • 0

    关注
  • 5

    粉丝
  • 0

    好友
  • 1

    获赞
  • 16

    评论
  • 5260

    访问数
关闭

站长推荐 上一条 /2 下一条

小黑屋| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-4-20 09:34 , Processed in 0.015711 second(s), 7 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
返回顶部