Array in Fortran

Page 1 of 1

0 Replies - 651 Views - Last Post: 28 October 2009 - 05:35 AM Rate Topic: -----

#1 Seba  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 02-August 08

Array in Fortran

Posted 28 October 2009 - 05:35 AM

Hi, guys. I want RESHAPE the array to give it a matrix format. The question is simple: Why it doesn't work?!

PROGRAM Matrix
IMPLICIT NONE
REAL :: F1, F2
REAL, DIMENSION(1, 10) :: f
F1=2000.0
F2=2000.0
f=RESHAPE(SOURCE=(/0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, F2, -F1/), SHAPE=(/2, 5/))
PRINT*, f
END PROGRAM Matrix



Note: F1 and F2 are parameters defined by the user.
Thanks!

Is This A Good Question/Topic? 0
  • +

Page 1 of 1