Fortran Fortran 3D array

  • Thread starter Triscas
  • Start date
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?
 
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,
 

AlephZero

Science Advisor
Homework Helper
6,953
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.
 
1,065
53
Oh, that's a good, practical idea.

Just googled...found this.
 

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving
Top