Re: The concept of a record



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).
.



Relevant Pages

  • Re: The concept of a record
    ... of values corresponds to your structure. ... In Fortran you will find a correspondence that says the first subscript ... In your example both structures lead to the same sequence of values. ... But you may find that MatLab does not understand ...
    (comp.lang.fortran)
  • Re: Write position
    ... But it's surprisingly hard to do in Fortran. ... the format correct to fill the record (including the newline sequence). ... NCOUNT = NCOUNT + 1 ...
    (comp.lang.fortran)
  • Re: Fuzzy matching of postal addresses [1/1]
    ... >position along the sequence. ... As to Python not being Fortran. ... Andrew McLean ...
    (comp.lang.python)
  • Re: MATLAB <-> FORTRAN
    ... When you do A\b it just calls the basic solvers Matlab knows, ... in some cases Gauss Elimination. ... In this case you can find a Gauss Solver, ... I've bitten the bullet and converted to Fortran ...
    (comp.soft-sys.matlab)
  • Re: Matlab Vectorisation Speed - How is it done in c++?
    ... Beating the performance of vectorized Matlab code is very ... Matlab makes calls to optimized C and Fortran libraries ... Use optimization level 3 on numerical code and level 2 on non- ...
    (comp.soft-sys.matlab)