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

Loading Data in Matlab (or Fortran)

  1. Aug 8, 2011 #1
    Okay, so I realize Fortran is not so popular today, but an answer to my problem would be appreciated for Matlab or Fortran .... or both!

    I have text file that looks like this:

    Title 1
    Title 2
    Title 3
    1 1 Data
    1 2 Data
    (so on)...
    N N Data
    1 1 Data
    (so on)....
    N N Data
    (and so on)... %data is always just a plain number.

    So basically I just want to load all of the "data" into a vector, even better if I can have a separate vector for each set of data between each title/subtitle.
    obviously in matlab, I have to use the Load function but I'm a bit lost how to do it this sophisticated.
  2. jcsd
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?