Does anyone have a algorithm for DFT without FFT function in matlab?
and second question is how can I make zero padding in this algorithm?
Signal Processing Stack Exchange is a question and answer site for practitioners of the art and science of signal, image and video processing. It only takes a minute to sign up.Sign up to join this community
As mentioned by the
applesoup, you should try
dftmtx(). However, if you want to write a code for generating the DFT matrix, here it is,
funtion dftmatrix = myDFTmtx(N) dftmatrix = ; for k = 0:N-1 row = ; for n = 0:N-1 row = [row exp(-j*2*pi*k*n/N)]; end dftmatrix = [dftmatrix; row]; end end
The matrix returned by this function when multiplied with the time domain sequence or column vector, will return its DFT coefficients.