From: Aniouska Conchon on
Hello,

I am working with Fortran77 and Matlab, i am novice using Fortran.

I have write a 3-dimensionnal file in fortran and would like to read it with matlab.
In fact, I manage to read my 2-dimensionnal file using fread, but that's not possible to read a 3-dimensionnal array with fread.

Have you got some ideas to read this file?

Thank you,

Anna
From: James Tursa on
"Aniouska Conchon" <pantouflettefuchia(a)gmail.com> wrote in message <huimj0$hg$1(a)fred.mathworks.com>...
> Hello,
>
> I am working with Fortran77 and Matlab, i am novice using Fortran.
>
> I have write a 3-dimensionnal file in fortran and would like to read it with matlab.
> In fact, I manage to read my 2-dimensionnal file using fread, but that's not possible to read a 3-dimensionnal array with fread.
>
> Have you got some ideas to read this file?

Read it in as a 1-D array and then reshape it to a 3-D array. Fortran and MATLAB both store the data in column order, so this simple reshape should work.

James Tursa
From: Aniouska Conchon on
Thank you.