zjgzsj.m
来自「功率谱分析是信号处理的重要内容」· M 代码 · 共 27 行
M
27 行
width=2;
TP=width;
t=-2*width:0.02:2*width;
x=rectpuls(t,width);
% plot(t,x);
X=abs(fft(x,2048));
subplot(311),plot(10*log10(fftshift(X)/max(X)));title('TP=2s');
axis([0 2048 -40 0])
%%%%%%
width=4;
TP=width;
t=-2*width:0.02:2*width;
x=rectpuls(t,width);
% plot(t,x);
X=abs(fft(x,2048));
subplot(312),plot(10*log10(fftshift(X)/max(X)));title('TP=4s');
axis([0 2048 -40 0])
%%%%%%%%%%%
width=8;
TP=width;
t=-2*width:0.02:2*width;
x=rectpuls(t,width);
% plot(t,x);
X=abs(fft(x,2048));
subplot(313),plot(10*log10(fftshift(X)/max(X)));title('TP=8s');
axis([0 2048 -40 0])
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?