Fortran 3D array

  • Fortran
  • Thread starter Triscas
  • Start date
  • #1
9
0

Main Question or Discussion Point

Hello!

I'm working in a programm which has a 3D array with a DIMENSION(16,221,900). When I use the debugger option and I print out the value of the matrix I don't know how to read the info.

I already know Fortran uses column-major order, storing the columns in sequence.

My doubt is: How could I pass this temporary value of the array to Matlab?
 

Answers and Replies

  • #2
1,065
53
I don't exactly know what you are asking...does it have anything to do with fortran or not? or do you just don't know how to read a 3 dimensional matrix into matlab?

Not that I can help because I don't use matlab, but I will give the same advice I always give: "baby steps...baby steps".

So, first put together a small 3-D matrix you can memorize and recognize, like a 3x3x3 matrix with the numbers 1-9 in the first plane, and so on...

...can you read this into matlab?
in which format?
can you read it as a single vector and then reshape it inside?

Get creative, try stuff out, alternatives, etc,
 
  • #3
AlephZero
Science Advisor
Homework Helper
6,994
291
So, first put together a small 3-D matrix you can memorize and recognize, like a 3x3x3 matrix with the numbers 1-9 in the first plane, and so on...
Or better, a 2x3x4 array, so you will know if you get the different dimensions (2, 3 and 4) in the wrong order for some reason.
 
  • #4
1,065
53
Oh, that's a good, practical idea.

Just googled...found this.
 

Related Threads on Fortran 3D array

  • Last Post
Replies
7
Views
10K
Replies
4
Views
1K
  • Last Post
Replies
2
Views
4K
  • Last Post
Replies
20
Views
2K
  • Last Post
Replies
1
Views
7K
  • Last Post
Replies
1
Views
4K
  • Last Post
Replies
2
Views
625
Replies
7
Views
7K
Replies
5
Views
3K
  • Last Post
Replies
6
Views
6K
Top