help-octave
[Top][All Lists]
Advanced

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

"load" as both command and function


From: Edward C. Jones
Subject: "load" as both command and function
Date: Sun, 27 Mar 2005 22:30:11 -0600
User-agent: Debian Thunderbird 1.0 (X11/20050116)

I found the following paragraph from the documentation for "load" to be difficult to understand:

     If invoked with a single output argument, Octave returns data
     instead of inserting variables in the symbol table. If the data
     file contains only numbers (TAB- or space-delimited columns), a
     matrix of values is returned.  Otherwise, "load" returns a
     structure with members corresponding to the names of the variables
     in the file.

A command cannot have an output argument. Only a function can. So we get:

something = list('a', 'b', 'c')
save -ascii "something.asc" something
somethingelse = load("-ascii", "something.asc")

An example in the documentation for "load" (and "save", ...) would be helpful. Where is the command <--> function relationship documented?



-------------------------------------------------------------
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]