[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: loading data
From: |
Mario Storti |
Subject: |
Re: loading data |
Date: |
Thu, 13 Aug 1998 17:14:02 -0300 |
>>>>> On Thu, 13 Aug 1998 12:21:25 -0600 (MDT),
>>>>> "David D. Clark" <address@hidden> said:
> I would like to be able to use the input command to load a file name
> without an extension, <filename>, use the strcat command to concatenate
> the string with the appropriate extension, <ext> and then use the load
> command to load the file <filename>.<ext>
> e.g.
> filename=input("Data File: ","s")
> datafile=strcat(filename,".dat")
> load datafile
> However, when I run this, the following error occurs
> octave:47> filename=input("Data File: ", "s")
> Data File: m0812x
> filename = m0812x
> octave:48> datafile=strcat(filename,".dat")
> datafile = m0812x.dat
> octave:49> load datafile
> error: load: couldn't open input file `datafile'
> error: evaluating index expression near line 49, column 1
You should write
octave> eval(["load " filename])
Hope this helps
Mario
%%%%%%<>%%%%%%<>%%%%%%<>%%%%%%<>%%%%%%<>%%%%%%<>%%%%%%<>%%%%%%<>%%%%%%<>%
Mario Alberto Storti | Fax: (54)(42) 55.09.44 |
Centro Internacional de Metodos Computacionales| Tel: (54)(42) 55.91.75 |
en Ingenieria - CIMEC (INTEC/CONICET-UNL) |........................|
INTEC, Guemes 3450 - 3000 Santa Fe, Argentina |
Reply: address@hidden, http://venus.unl.edu.ar/gtm-eng.html |
- loading data, David D. Clark, 1998/08/13
- Re: loading data,
Mario Storti <=