Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

reshape issue!

Status
Not open for further replies.

milenko76

Technical User
Mar 26, 2010
100
PT
I have a file with 1680 numerical values,I want to read it and reshape it,later use that array for further calculations.Like this:
integer:: i,j
real,dimension(1680) :: s
real, dimension(21,80) :: ist
integer,dimension(80,80) :: wd,wd2
real,dimension(80,1):: d,wr
real,dimension(21,1):: l01
real,dimension(21) ::l0
real :: norm20

read(14,*)(s(i),i=1,1680)
ist=reshape(s,shape=shape(ist))
write(109,*)ist

The question is how columns are created?Is it equivalent to a loop?Does it take first 80 elements or?
 
The order is 1,1 2,1 3,1 ... 1,2 2,2 3,2...

You could just use equivalence instead of reshape.
Code:
equivalence (s(1), ist(1,1))
If that sounds to 77ish, you could use transfer.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top