dft - x = x N = M end Xk=zeros(N,1 n = 0:N-1 for k=0:N-1...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
% % Discrete Fourier Transform % function Xk = dft(x) [N,M] = size(x); if M ~=1, % makes sure that x is a column vector
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: x = x'; N = M; end Xk=zeros(N,1); n = 0:N-1; for k=0:N-1 Xk(k+1) = exp(-j*2*pi*k*n/N)*x; end...
View Full Document

Ask a homework question - tutors are online