PDA

View Full Version : Fast Fourier transform - MATLAB


bs19777
Jun29-11, 08:31 AM
I have raw data in following format

Time <-> Ch1 <-> Ch2 <-> Ch3
0.01 <-> 1.6 <-> 1.62 <-> 1.92
0.03 <-> 1.63 <-> 1.62 <-> 1.96
0.05 <-> 1.63 <-> 1.63 <-> 2.04
..........so on 1000 raw

PS: those <-> are used in this forum to show as table, in actual data those are separate column.

How can I plot FFT in matlab from this data ?

Do I have to convert anything first ?

I am newbi to matlab, any help would be greatly appreciated.

Thanks a lot in advance.

MATLABdude
Jun29-11, 09:39 PM
Welcome to PhysicsForums!

If the data is named foo, you can extract say, the third column by typing in:
>>col3=foo(:,3)

(the syntax means extract every row of the third column)

To take the FFT, you use the fft function:
http://www.mathworks.com/help/techdoc/ref/fft.html

You can find plotting information (the 'plot' function) by clicking the 'index' button on the left hand side of the screen.