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

📄 exa110702_specgram.m

📁 用matlab编写的数字信号处理源码
💻 M
字号:
%-------------------------------------------------------------------------
% exa110702_specgram.m ,for example 11.7.2  and fig11.7.1
% to test specgram.m 
%-------------------------------------------------------------------------
clear;

t=0:0.001:1.024-.001; 
N=1024; 

% 得到两个Chirp 信号,并相加;
y1=chirp(t,0,1,350);
y2=chirp(t,350,1,0);
y=y1+y2;
subplot(211);plot(t,y1);
ylabel(' Chirp signal y1')

% 求两个Chirp 信号和的短时傅里叶变换;
[S,F,T]=specgram(y,127,1,hanning(127),126); 
subplot(212);
surf(T/1000,F,abs(S).^2)
view(-80,30);
shading flat;
colormap(cool);
xlabel('Time')
ylabel('Frequency')
zlabel('spectrogram')

   
  

⌨️ 快捷键说明

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