[fortran90] arrange value in row into column

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 2K views
s_hy
Messages
57
Reaction score
0
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
 
Physics news on Phys.org
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.
 
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.