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

Importing Data in MATLAB

  1. Sep 22, 2012 #1
    Hi. Suppose I load data from a .csv file:

    Blah
    @Blah
    2Blah
    Blah
    f Blah
    fa Blah
    Blahasd
    Blahasda
    vasf Blah
    as Blah
    asdas Blah



    Date Time Ch1:
    07/25/2012 42:46.0 96.385
    07/25/2012 42:46.0 -177.608
    07/25/2012 42:46.0 155.481
    07/25/2012 42:46.0 64.15

    an attempt would be to manipulate the data first before I read it, things would be much more subtle:

    fid = fopen('PULL1.CSV');

    data = textscan(fid, '%s' ,'delimiter', '\b');

    data2 = data{:,:}

    data3 = data2(13:end,:);

    fclose(fid);

    -----

    The output then is:

    '07/25/2012,17:49:56.080,37.288'
    '07/25/2012,17:49:56.085,37.288'
    '07/25/2012,17:49:56.090,53.405'


    Would I still have to run textscan to recognize the entries seperated by the commas?

    How would I be able to plot time vs. the third column?
     
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted



Similar Discussions: Importing Data in MATLAB
Loading...