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

How to create a verctor in matlab using data recorded in a text document?

  1. Jul 19, 2010 #1
    There is a text document with data seperated by the "," sign.

    such as 58.5698, 75.2495, 57.1548.....

    I want to createa vector called Y in matlab using these datas. there are 50 values.
    i opened the file with the fopen command.
    And then tried with the fgetl command. but when I use the "Y(1)" command to get the first value, it produces the number 5 instead of the 58.5698.

    Thanks in advance.
  2. jcsd
  3. Jul 20, 2010 #2
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook