% Code 24: DFS (Discrete Fourier Series)
% Input: x (column vector containing evaluation grid)
%        fk (DFT Fourier coefficients)
% Output: FNx (DFS evaluated at grid x)  
function FNx = dfs(fk,x)
N = length(fk); M = length(x) ; k = [0:N-1]; 
PHI = exp(i*x*(k-N/2)); FNx = PHI*fk;
