Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Fast Fourier transform - MATLAB

  1. Jun 29, 2011 #1
    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.
     
  2. jcsd
  3. Jun 29, 2011 #2

    MATLABdude

    User Avatar
    Science Advisor

    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.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook