From help-octave-request at octave dot org Tue Apr 27 22:21:52 2004 Subject: Re: Load a file with name specified by a string? From: Eacheon To: help at octave dot org Date: Tue, 27 Apr 2004 22:04:48 -0500 Ok, I find in this list that >load(filename, 'var1','var2',...) should work. But I need to do something like >load -force filename var1 var2 ... Are there any method can avoid using sprint and eval? Thanks! - yichun Eacheon wrote: > Hi, > > In matlab, load a mat-binary file specified by a string: > > parfile = [data_dir, filesep, 'subdir', filesep, filename, '.par']; > if exist(parfile, 'file') > load(parfile, '-MAT', 'preterms', 'wholeterms', 'gain', ... > 'atod_scale', 'tracedraw'); > end > > How to do this in Octave? I was just migrate some codes to Octave but > find I have no way to do it. Any suggestion is highly appreciated. > > - yichun > ------------------------------------------------------------- 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 -------------------------------------------------------------