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

[fortran90] arrange value in row into column

  1. Oct 17, 2013 #1
    I have a data file, let's say test.dat which is contain [1 2 3 4 5 6 7.......3000]. the question is how can I re-arrange this data from a row into a column so that I will have a set of data like this
    1
    2
    3
    4
    5
    6
    7
    .
    .
    .
    3000

    in fortran90 or matlab also will be okay.

    thank you
     
  2. jcsd
  3. Oct 18, 2013 #2

    DrClaude

    User Avatar

    Staff: Mentor

    I don't understand what you are trying to do. In Fortran, there is no distinction between a row vector and a column vector. A 1D array is just a 1D array.
     
  4. Oct 18, 2013 #3

    Mark44

    Staff: Mentor

    Also, the data in a file is not arranged in rows or columns. It's a sequence of numbers (binary file) or characters (text file). There can also be non-printing characters such as tab, newline, and other control characters.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: [fortran90] arrange value in row into column
  1. Fortran90 help (Replies: 4)

  2. Fortran90 help (Replies: 5)

Loading...