?? program_03_03.m
字號:
% Program 3_3
% Illustration of IDFT Computation
%
% Read in the length K of the DFT and the desired
% length N of the IDFT
colordef black;
K = input('Type in the length of the DFT = ');
N = input('Type in the length of the IDFT = ');
% Generate the length-K DFT sequence
k = 1:K;
U = (k-1)/K;
% Compute its N-point IDFT
u = ifft(U,N);
% Plot the DFT and its IDFT
k=1:K;
stem(k-1,U,'g')
xlabel('Frequency index k'); ylabel('Amplitude')
title('Original DFT samples')
pause
subplot(2,1,1)
n = 0:1:N-1;
stem(n,real(u),'g')
title('Real part of the time-domain samples')
xlabel('Time index n'); ylabel('Amplitude')
subplot(2,1,2)
stem(n,imag(u),'g')
title('Imaginary part of the time-domain samples')
xlabel('Time index n'); ylabel('Amplitude')
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -