MATLAB: How i creat a code abaout fft without using fft comand

fft comand fft help edit

when i write "help fft" i get this formula
X(k) = sum x(n)*exp(-j*2*pi*(k-1)*(n-1)/N), 1 <= k <= N
how to write this formula in matlab comand and get the result of this. where i have a variable fs = formula sampling, and x = data in time domain?
i need your help thankyou

Best Answer

What exactly is the problem? What have you tried so far?
for n = 1:N
X_k = sum(x(n) * exp(-2j * pi * (k-1) * (n-1)/N);
end
Related Question