Re: The concept of a record



qsc wrote:
(snip)

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

The shape is not written into the file by Fortran. Most likely they
come out (n). That is, a 1D array, but I don't know matlab enough
to say. If you write an n by m array in one unformatted WRITE
n*m elements will be written, again without any shape.

In R, one can change the shape after they have been read. I presume
matlab can do that, too.

-- glen

.



Relevant Pages

  • Re: Absolute beginner vs. fuzzy logic
    ... into B) is readily available in MatLab. ... new +1-dimensional array. ... The graph showed how a certain mechanical system ... > each iteration. ...
    (comp.soft-sys.matlab)
  • Re: zero based arrays?
    ... array, even in Matlab, its just that Matlab is an interpreted ... Every programming language has things it does differently from every other ... first) element of the array. ... case you'll be writing in C or C++ and so you'll use the native indexing ...
    (comp.soft-sys.matlab)
  • Re: need help on building a "Next" button in GUI
    ... I am a new user of MatLab. ... When I selected the pictures, they did form an array FileName(), but my next_callback did not work at all. ... % hObject handle to figure ... function varargout = Image_OutputFcn ...
    (comp.soft-sys.matlab)
  • new to FFTW - I have some questions
    ... I am new to using the FFTW algorithms in C++, ... I have used matlab for ... For example, the array might consist of 40 trials, ... optimal algorithm based on the size of the FFT alone? ...
    (comp.dsp)
  • Re: Appending to arrays in a loop efficiently
    ... When appending to arrays repeatedly in a loop, the Matlab editor warns ... Another possibility is to double the size of the array manually each ... The simplest solution is to use a cell array. ...
    (comp.soft-sys.matlab)