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

Jordi Gutiérrez Hermoso jordigh at gmail.com
Wed Oct 1 11:12:56 CDT 2008


2008/10/1 Michael Chen <vancouver.michael at gmail.com>:
> 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

Try to use the functional form of the call:

     load("-ascii",filename)

HTH,
- Jordi G. H.


More information about the Help-octave mailing list