[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"reshape"-like function in liboctave?

From: E. Joshua Rigler
Subject: "reshape"-like function in liboctave?
Date: Fri, 27 Jul 2001 18:30:54 -0600

Is there a quick and easy way to get reshape.m like functionality, but
through liboctave?  My first inclination was the resize command, but
this simply resets the dimensions of the matrix.  I would like to be
able to turn a column vector, in a dynamically linked function, into a
2-D matrix.

If this isn't easy, can someone please tell me how Octave puts data into
its 2D arrays internally?  Is it row-major or column-major?  Actually,
if you don't mind, could you confirm that my interpretation of row-major
and column major is correct:


 0 1  (stored as)
 2 3  ----------> [0 2 4 1 3 5]
 4 5


 0 1  (stored as)
 2 3  ----------> [0 1 2 3 4 5]
 4 5

I know that in the interpreter at least, it does it like the first
example, and since I learned (perhaps mistakenly) that row major implied
that the row index varied the fastest, I call that row-major.  The
problem is that the library I am using seems to have the opposite


Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]