标签:sig cto -- 加油! 努力 for atl using png
终于看到第5章了,继续努力,加油!!!
代码:
xn = [0, 1, 2, 3]; N =4; Xk = dfs(xn,N)
用到的dfs函数:
function [Xk] = dfs(xn,N) %% Computes Discrete Fourier Series Coefficients %% --------------------------------------------- %% [Xk] = dfs(xn,N) %% Xk = DFS coeff. array over 0 <= k <= N-1 %% xn = One period of periodic signal over 0 <=n <= N-1 %% N = Fundamental period of xn %% n = [0:1:N-1]; % row vector for n k = [0:1:N-1]; % row vector for k WN = exp(-j*2*pi/N); % Wn factor nk = n‘*k; % creates a N by N matrix of nk values WNnk = WN .^ nk; % DFS matrix Xk = xn * WNnk; % row vector for DFS coefficients
运行结果:
《DSP using MATLAB》示例Example5.1
标签:sig cto -- 加油! 努力 for atl using png
原文地址:http://www.cnblogs.com/ky027wh-sx/p/6127927.html