Re: The concept of a record
- From: qsc <qingshan.chen@xxxxxxxxx>
- Date: Wed, 30 Jan 2008 18:08:49 -0800 (PST)
On Jan 30, 3:18 pm, Gordon Sande <g.sa...@xxxxxxxxxxxxxxxx> wrote:
The values that are in the record come one after the other.
The structure of (1,n) or (n,1) is an artifact of your program.
There will usually be some documentation on how the sequence
of values corresponds to your structure. RTFM (Read The Fine
(or F***ing accoding to some folks) Manual)!
In Fortran you will find a correspondence that says the first subscript
varies most rapidly. It only matters if there are several (like 2) subscripts.
Other languages might choose to vary the last subscript most rapidly.
Fortran is the oldest commonly used language so it should be treated
deferentially with its choice preferred notwithstanding the opinions
of some upstart newcomers.
In your example both structures lead to the same sequence of values.
So the answer it is both! If you had some other value than 1 the answer
would be something else. But you may find that MatLab does not understand
Fortran records.
Hi Gordon,
I know this part of knowledge about Fortran. My question should have
been put this way: with X written out as in the example, what shape
would it be of the matrix A = fread(fid)? Here fread is the matlab
command. For a matrix in matlab, the shape (n,1) and (1,n) look
visually differently, although internally they may both be stored as a
sequence of numbers in the memory. It turns out that the matrix has
the shape (n,1).
.
- Follow-Ups:
- Re: The concept of a record
- From: Gordon Sande
- Re: The concept of a record
- From: glen herrmannsfeldt
- Re: The concept of a record
- 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: Gordon Sande
- The concept of a record
- Prev by Date: Re: Why is this structure misaligned?
- Next by Date: Automatically transform or expand do loop in a subroutine
- Previous by thread: Re: The concept of a record
- Next by thread: Re: The concept of a record
- Index(es):
Relevant Pages
|
|