LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-12-2009, 06:20 PM   #1
aihaike
Member
 
Registered: Feb 2006
Location: Paris, France
Distribution: Slackware, CentOS
Posts: 270

Rep: Reputation: 20
Question array of array in Fortran 90


Dear all,

I'm trying to figure how to create an small array of 3x3 arrays such I can do

Code:
SUM1(i) = SUM1(i) +  SUM2
where i goes from 1 to 8 and SUM2 is a 3x3 array.

Any idea?

Best,

Eric.

Last edited by aihaike; 07-12-2009 at 08:08 PM.
 
Old 07-13-2009, 03:35 AM   #2
Dan04
Member
 
Registered: Jun 2006
Location: Texas
Distribution: Ubuntu
Posts: 207

Rep: Reputation: 37
Try this:

Code:
real, dimension(1:8, 1:3, 1:3) :: SUM1

do i = 1, 8
    SUM1(i, :, :) = SUM(i, :, :) + SUM2
end do
 
Old 07-13-2009, 04:34 AM   #3
aihaike
Member
 
Registered: Feb 2006
Location: Paris, France
Distribution: Slackware, CentOS
Posts: 270

Original Poster
Rep: Reputation: 20
Thumbs up

It's works!
Thank you so munch.
Best,

Eric.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
3D array in MAT file ->DAT file to read in FORTRAN BrandonPossible Programming 2 07-03-2009 01:14 AM
Bash Variable Array, Trying to add another value into the array helptonewbie Linux - Newbie 6 03-02-2009 11:18 PM
[perl] copying an array element into another array s0l1dsnak3123 Programming 2 05-17-2008 01:47 AM
how to find extent of 1-dim array in fortran 90? johnpaulodonnell Programming 1 03-21-2007 11:42 AM
Fortran Array Tricks? RWild Programming 0 07-22-2003 01:42 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration