School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 307,148 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,742 people online right now. Registration is fast and FREE... Join Now!




Array in Fortran

 

Array in Fortran

Seba

28 Oct, 2009 - 04:35 AM
Post #1

New D.I.C Head
*

Joined: 2 Aug, 2008
Posts: 2

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

CODE

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!

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 04:09PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month