MATLAB: I tried using ‘FFT’ function in MATLAB to transform the given function from time to frequency domain…it gave me the graph but on the x axis the time domain(values) remained the same and did not change into frequency domain as the graph revealed..

ftt frequency domain

I tried using 'FFT' function in MATLAB to transform the given function from time to frequency domain…it gave me the graph but on the x axis the time domain(values) remained the same and did not change into frequency domain as the graph revealed..

Best Answer

The fft function has one output argument, it's the discrete fourier transform of your function. you have to provide the frequency vector to plot your output.