短时傅立叶变换matlab仿真程序.docx

上传人:小飞机 文档编号:3672419 上传时间:2023-03-14 格式:DOCX 页数:6 大小:36.76KB
返回 下载 相关 举报
短时傅立叶变换matlab仿真程序.docx_第1页
第1页 / 共6页
短时傅立叶变换matlab仿真程序.docx_第2页
第2页 / 共6页
短时傅立叶变换matlab仿真程序.docx_第3页
第3页 / 共6页
短时傅立叶变换matlab仿真程序.docx_第4页
第4页 / 共6页
短时傅立叶变换matlab仿真程序.docx_第5页
第5页 / 共6页
亲,该文档总共6页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述

《短时傅立叶变换matlab仿真程序.docx》由会员分享,可在线阅读,更多相关《短时傅立叶变换matlab仿真程序.docx(6页珍藏版)》请在三一办公上搜索。

1、短时傅立叶变换matlab仿真程序clear all;clc;%->Basic Parameters<-f1 = 500;f2 = 1000;fN = 8000;n = 10000;t = 0:1/fN:(n-1)/fN;%->Generate signals<-sig1 = sin(2*pi*500*t);sig2 = sin(2*pi*1000*t)/2;puls = zeros(size(t);puls(2100) = 10;puls(2132) = 10;x = sig1+sig2+puls;%->window width<-win1 = 12.8*fN/100

2、0; %12.8ms 102.4 pointswin2 = 6.4*fN/1000; %6.4ms 51.2 pointswin3 = 3.2*fN/1000; %3.2ms 25.6 points%->stepping length<-stepping1 = 16; stepping2 = 32;stepping3 = 64;%->nfft points<-nfft = min(256,length(x);%->painting(Time Frequency Analysis)<-%->1.Hamming windows,different window widt

3、h<-figure(1)subplot(311);specgram(x,nfft,fN,hanning(round(win3);xlabel(time(ms)ylabel(frequency(kHz)title(STFT Time-Frequency Map,Hamming windows,window width 3.2ms)subplot(312);specgram(x,nfft,fN,hanning(round(win2);xlabel(time(ms)ylabel(frequency(kHz)title(STFT Time-Frequency Map,Hamming windows

4、,window width 6.4ms)subplot(313);specgram(x,nfft,fN,hanning(round(win1);xlabel(time(ms)ylabel(frequency(kHz)title(STFT Time-Frequency Map,Hamming windows,window width 12.8ms)%-%->2.Gauss window ,different window width<-figure(2)subplot(311);specgram(x,nfft,fN,gausswin(round(win3);xlabel(time(ms)

5、ylabel(frequency(kHz)title(STFT Time-Frequency Map,Gauss window ,window width 3.2ms)subplot(312);specgram(x,nfft,fN,gausswin(round(win2);xlabel(time(ms)ylabel(frequency(kHz)title(STFT Time-Frequency Map,Gauss window ,window width 6.4ms)subplot(313);specgram(x,nfft,fN,gausswin(round(win1);xlabel(time

6、(ms)ylabel(frequency(kHz)title(STFT Time-Frequency Map,Gauss window ,window width 12.8ms)%-%->3.Hamming windows,different stepping length <-figure(3)subplot(311);specgram(x,nfft,fN,hanning(round(win1),stepping1);xlabel(time(ms)ylabel(frequency(kHz)title(STFT Time-Frequency Map,Hamming windows,wi

7、ndow width12.8ms,stepping length 16)subplot(312);specgram(x,nfft,fN,hanning(round(win1),stepping2);xlabel(time(ms)ylabel(frequency(kHz)title(STFT Time-Frequency Map,Hamming windows,stepping length 32)subplot(313);specgram(x,nfft,fN,hanning(round(win1),stepping3);xlabel(time(ms)ylabel(frequency(kHz)t

8、itle(STFT Time-Frequency Map,Hamming windows,window width12.8ms,stepping length 64)%-%->4.Gauss window ,different stepping length <-figure(4)subplot(311);specgram(x,nfft,fN,gausswin(round(win1),16);xlabel(time(ms)ylabel(frequency(kHz)title(STFT Time-Frequency Map,Gauss window ,window width12.8ms

9、,stepping length 16)subplot(312);specgram(x,nfft,fN,gausswin(round(win1),32);xlabel(time(ms)ylabel(frequency(kHz)title(STFT Time-Frequency Map,Gauss window ,window width12.8ms,stepping length 32)subplot(313);specgram(x,nfft,fN,gausswin(round(win1),64);xlabel(time(ms)ylabel(frequency(kHz)title(STFT Time-Frequency Map,Gauss window ,window width 12.8ms,stepping length 64)%-

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 生活休闲 > 在线阅读


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号