clear all
%窗口函数%
n1=40;
window=boxcar(n1);
w1=window;
figure(1);
stem(w1);
% 非平稳信号产生%
fs=1000;
a=0:1/fs:1;
f0=0;
f1=150;
y1=chirp(a,f0,1,f1);短时傅里叶变换matlab程序
x=y1(1:510);
figure(2);
%窗口函数%
n1=40;
window=boxcar(n1);
w1=window;
figure(1);
stem(w1);
% 非平稳信号产生%
fs=1000;
a=0:1/fs:1;
f0=0;
f1=150;
y1=chirp(a,f0,1,f1);短时傅里叶变换matlab程序
x=y1(1:510);
figure(2);
plot(x);
% 短时傅里叶变换%
t=1:length(x);
n=length(x);
[tfr,t,f]=tfrstft(x,t,n,w1,0);
contour(t,f,abs(tfr))
% 短时傅里叶变换%
t=1:length(x);
n=length(x);
[tfr,t,f]=tfrstft(x,t,n,w1,0);
contour(t,f,abs(tfr))
clc
clear all
%窗口函数%
n1=40;
window=boxcar(n1);
w1=window;
figure(1);
stem(w1);
% 非平稳信号产生%
clear all
%窗口函数%
n1=40;
window=boxcar(n1);
w1=window;
figure(1);
stem(w1);
% 非平稳信号产生%
fs=1000;
a=0:1/fs:1;
f0=0;
f1=150;
y1=chirp(a,f0,1,f1);
x=y1(1:510);
figure(2);
plot(x);
% 短时傅里叶变换%
t=1:length(x);
n=length(x);
[S,F,T,P]=spectrogram(x,w1,32,256);
surf(T,F,10*log10(abs(P)));
axis tight;
view(0,90);
a=0:1/fs:1;
f0=0;
f1=150;
y1=chirp(a,f0,1,f1);
x=y1(1:510);
figure(2);
plot(x);
% 短时傅里叶变换%
t=1:length(x);
n=length(x);
[S,F,T,P]=spectrogram(x,w1,32,256);
surf(T,F,10*log10(abs(P)));
axis tight;
view(0,90);
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论