help-octave
[Top][All Lists]
Advanced

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

rename, save `whos`


From: John W. Eaton
Subject: rename, save `whos`
Date: Fri, 14 Jul 2000 00:02:56 -0500 (CDT)

On 13-Jul-2000, Daniel Heiserer <address@hidden> wrote:

| Hi,
| is there a way to rename a matrix.
| I mean a real "move" not a "copy" 
| and a delete.
| 
| The thing is that I have thousands of matrices in my 
| memory and I do not want to shuffle
| GB of ram around.....

Someone else already pointed out that an assignment like

  b = a;

doesn't actually make a copy of the data.  Instead, it simply adds a
new symbol to the symbol table and increments a reference count.  A
copy of the data will be made if you later modify either a or b (by
doing something like b(1,2) = 3, for example).

| Is there also a way like in matlab to
| store the result of 'whos' in  a struct?

Not yet, since Octave doesn't have `struct arrays'.  Would you like to
help by implementing them?

Thanks,

jwe



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

Octave's home on the web:  http://www.che.wisc.edu/octave/octave.html
How to fund new projects:  http://www.che.wisc.edu/octave/funding.html
Subscription information:  http://www.che.wisc.edu/octave/archive.html
-----------------------------------------------------------------------



reply via email to

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