Re: The concept of a record
- From: glen herrmannsfeldt <gah@xxxxxxxxxxxxxxxx>
- Date: Wed, 30 Jan 2008 11:57:11 -0800
qsc wrote:
After reading Gordon and Klaus's replies, I came to the> conclusion that write(12) U(:) will write all the values
> in U(:) as one record. But the concept of "line" doesn't
> apply here.
If I am correct in the statement above, then what will be> produce a data matrix. What will be the shape of the matrix?
the structure of the data file? Or put in another way, after
writing the array into an external data file, I load the
data file using fread of matlab. The function fread will
Is it (1,N), or is it (N, 1), or something else?
All the data from one UNFORMATTED WRITE statement goes into
one record. The shape, if any, does not.
REAL A,B,C,D,X(4)
DATA A,B,C,D/1.,2.,3.,4./
WRITE(1) A,B,C,D
WRITE(1) A,B,C,D
REWIND 1
READ(1) X(1:4)
WRITE(*,*) X
READ(1) X(3:4),X(1:2)
You can read or write with separate scalar variables, arrays, array
elements, implied DO over any of the above, all goes into one record.
Systems may have a record length limit, and even if they don't it
might require a buffer the size of the record to be written.
Small records may have excess overhead, very large ones might
have other types of overhead.
-- glen
.
- 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
- The concept of a record
- Prev by Date: Re: The concept of a record
- Next by Date: Re: IVF + Xp (32bit) = 3Gb
- Previous by thread: Re: The concept of a record
- Next by thread: Re: The concept of a record
- Index(es):
Relevant Pages
|
|