Hello,
Can anybody explain how the fft is done in case of data points? I am meassuring 50Samples per second , with 50Hz for 1 second. Well, I got a Little help from an user, but I do not understand what was done in the code. the code Looks like this:
Fs = 50; %Sampling Frequency
T = 1/Fs; L = 50; %Signal length
Y = fft(voltage); P2 = abs(Y/L); P1 = P2(1:L/2+1); P1(2:end-1) = 2*P1(2:end-1); f = Fs*(0:(L/2))/L; plot(f,P1)
I don't understand why the code Looks like this? It seems, that the fft is done for half of the signal. Can anybody give me an example please how it is done for the whole Signal?
Best Answer