dtft_r_win.m
来自「经典《信号与系统》教程的matlab例程,对深入理解信号与系统相关概念有很大帮助」· M 代码 · 共 21 行
M
21 行
%==========================================================================
% Name:DTFT.m
% The program compute the DTFT of discrete-time sequence x(n),
% and plot the curves.
%==========================================================================
clear;
n=-20:20;
f=u(n+6)-u(n-7);%input('Type in the expression of sequence x(n):');
W1=pi;
N=512;
k=-N:N;
W=k*W1/(N);
F=f*exp(-j*n'*W);
subplot(2,1,1);stem(n,f,'.');grid on;
xlabel('Index n');
title('The time window function RN(n)');
subplot(2,1,2);plot(W,F);grid on;
xlabel('frequency (*pi)');
title('The frequency response of the window RN(n)');
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?