no obvious variable name using 'load'
Sergei Steshenko
sergstesh at yahoo.com
Sat Dec 20 15:03:52 CST 2008
Hello,
this is what 'help load' (among other things) says:
"
`-ascii'
Force Octave to assume the file contains columns of numbers
in text format without any header or other information. Data
in the file will be loaded as a single numeric matrix with
the name of the variable derived from the name of the file.
".
And this is my experiment:
"
octave:1> system("echo 1234567890 > doo.dah.txt;cat doo.dah.txt");
1234567890
octave:2> load('-ascii', 'doo.dah.txt');
octave:3> doo
error: `doo' undefined near line 3 column 1
octave:3> doo.dah
error: `doo' undefined near line 3 column 1
octave:3> dah
error: `dah' undefined near line 3 column 1
octave:3> version
ans = 3.0.3
octave:4>
".
On the one hand, I see no error or warning message due to 'load' command,
on the other hand I see no way to deduce the variable name.
I think a version of 'load' which returns a value is necessary.
Thanks,
Sergei.
More information about the Bug-octave
mailing list