Re: The concept of a record
- From: qsc <qingshan.chen@xxxxxxxxx>
- Date: Wed, 30 Jan 2008 17:59:25 -0800 (PST)
On Jan 30, 2:57 pm, dpb <n...@xxxxxxx> wrote:
Where you have a problem is that if you OPEN the file in Fortran as
UNFORMATTED there is some internal Fortran file record structure (in
short, required to support Fortran operations like BACKSPACE) that
Matlab's fread() is not expecting.
To write a file for the purpose, you need stream or so-called "binary"
i/o. To achieve this depends on the compiler as it was not a standard
facility until the '03 Standard.
Check your compiler documentation for details of transferring files to
other systems--normally there will be an example of how to accomplish
the task. If that fails, post the particular compiler and somebody here
will undoubtedly know the proper incantation.
--
dpb, thank you for pointing this out to me. Indeed I had trouble at
the first try. I noticed your post, and looked up about "stream I/O",
and I found a tutorial on it by Clive Page. From that tutorial, I
learned that stream I/O has been implemented by g95 compiler, which is
what I am using. What I did is just add access="stream" to the open
statement, and then everything works all right.
.
- References:
- The concept of a record
- From: qsc
- Re: The concept of a record
- From: Klaus Wacker
- Re: The concept of a record
- From: qsc
- Re: The concept of a record
- From: dpb
- The concept of a record
- Prev by Date: Re: IVF + Xp (32bit) = 3Gb
- Next by Date: Re: Why is this structure misaligned?
- Previous by thread: Re: The concept of a record
- Next by thread: Re: The concept of a record
- Index(es):
Relevant Pages
|