load -ascii strcat(int2str(2001), "data.txt")

Michael Chen vancouver.michael at gmail.com
Wed Oct 1 10:16:33 CDT 2008


Dear there, how can I load a data file on fly? Here were what I tried.

--------------------------------------------------------------
octave:30> load -ascii 2001PS.octave

octave:31> load -ascii strcat(int2str(2001),"PS.octave")
parse error:

  syntax error

>>> load -ascii strcat(int2str(2001),"PS.octave")
                                                ^

octave:31> file = strcat(int2str(2001),"PS.octave")
file = 2001PS.octave
octave:32> load -ascii file
error: load: unable to find file file


More information about the Help-octave mailing list