Performing FFT in Matlab set of signals containing time and amplitude was given to me and asked to process the signal with the help of FFT function. I need help in converting the signal to frequency domain and to extract the feature from the signal so that I can compare the test signal with the given signal so the signal is a fault signal or not
If doing this in Matlab the command is fft(x) where x is your signal. Note that the result will be presented as a complex frequency vector of N points (or bins) from 0 to N-1.  Bin 0 is representative of the DC term and bin N-1 is 1 bin less than your sampling rate. Due to aliasing in digital sampling, this also represents the first negative frequency bin. Often we wish to view the spectrum with DC in the center with the positive and negative half spectrums. To do this easily in Matlab use fftshift:

out = fftshift(fft(y))


Also note that out will be complex, so you may want to view magnitude and phase separately:

mag = abs(out)


or

magdB = 20*log10(abs(out))


phase = angle(out)    &lt;- in radians.

Hope that helped!