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

Handle dataset in MATLAB

  1. Nov 15, 2014 #1
    I have to analyze a large set of GPS measurement data in MATLAB but when i transfer the list of data in the editor like:

    8374847.323
    8374827.545
    8374863.565
    8374831.775
    8374889.923
    8374872.112
    ......

    How do I put it in a array

    A= [value1 value2 value3 .......valueN]?
     
  2. jcsd
  3. Nov 15, 2014 #2

    mfb

    User Avatar
    2016 Award

    Staff: Mentor

  4. Nov 15, 2014 #3
    No, niether dos it look very helpful

    I tried A=dataset('File','filename') but it didn't work.
     
  5. Nov 15, 2014 #4

    mfb

    User Avatar
    2016 Award

    Staff: Mentor

    The example B = [12, 62, 93, -8, 22; 16, 2, 87, 43, 91; -4, 17, -72, 95, 6] should work.
    I don't know the source data format. You can also try to directly copy it into an existing array in the array view.
     
  6. Dec 3, 2014 #5

    FactChecker

    User Avatar
    Science Advisor
    Gold Member

    If you have an editor that lets you append a space and three dots ' ...' at the end of every line of data, that is how you can separate the data and continue the MATLAB statement to the next line. So you want something like:

    A = [ ...
    8374847.323 ...
    8374827.545 ...
    8374863.565 ...
    .
    .
    .
    8374872.112 ...
    ];
     
  7. Dec 4, 2014 #6

    DrClaude

    User Avatar

    Staff: Mentor

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Handle dataset in MATLAB
Loading...