help-octave
[Top][All Lists]
Advanced

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

Re: save function


From: Paul Kienzle
Subject: Re: save function
Date: Sun, 6 Mar 2005 16:30:01 -0500

You can save multiple variables in the same file.  Load will load all
of the variables, either into the current namespace using 'load file'
or into the elements of a structure using 's = load file'.

- Paul

On Mar 6, 2005, at 3:32 PM, Gorazd Brumen wrote:

Thanks,

I found a solution with replace command, but may I ask why is it necessary
to print this things into a file, when one only wants to get the
value of a variable printed out? I know that the file was created
by Octave 2.1.64 on Sun, Mar 06 etc, that the variable name is T
and is a scalar. This seems (to me at least) a very weird feature.

Thanks again,
Gorazd

Paul Kienzle wrote:
Simple solution:
    grep -v ^# filename
This fails, e.g., if you save something like x="# matrix".
If you know the number of header lines (e.g., for matrices or strings):
    tail +6 filename
- Paul
On Mar 6, 2005, at 2:24 PM, Gorazd Brumen wrote:
Hi,

How do I get rid of the following 3 lines that precede
the variable value (1 in this case) when I use save in octave?

# Created by Octave 2.1.64, Sun Mar 06 14:17:52 2005 EST <address@hidden>
# name: T
# type: scalar
1


Gorazd


--
Gorazd Brumen
Mail: address@hidden
WWW: http://valjhun.fmf.uni-lj.si/~brumen
PGP: Key at http://pgp.mit.edu, ID BCC93240



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

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


--
Gorazd Brumen
Mail: address@hidden
WWW: http://valjhun.fmf.uni-lj.si/~brumen
PGP: Key at http://pgp.mit.edu, ID BCC93240



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

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




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

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



reply via email to

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