program_03_03.m
来自「自编的一些小波源程序,用MATLAB编的.希望对那些喜欢小波的人有所帮助.去解压」· M 代码 · 共 29 行
M
29 行
% 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 + =
减小字号Ctrl + -
显示快捷键?