LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   array of array in Fortran 90 (https://www.linuxquestions.org/questions/programming-9/array-of-array-in-fortran-90-a-739610/)

aihaike 07-12-2009 06:20 PM

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.

Dan04 07-13-2009 03:35 AM

Try this:

Code:

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

do i = 1, 8
    SUM1(i, :, :) = SUM(i, :, :) + SUM2
end do


aihaike 07-13-2009 04:34 AM

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

Eric.


All times are GMT -5. The time now is 08:18 AM.