From help-request at octave dot org Tue Mar 22 09:39:45 2005 Subject: Using a variable in a command insdie a function From: "Edward C. Jones" To: help at octave dot org Date: Tue, 22 Mar 2005 09:29:51 -0600 I have a command inside a function. I want the command to depend on some variable. Here is an ugly way to do it: function silly filename = 'mess.asc'; x = 77; s = ['save -ascii ' filename ' x']; eval(s); endfunction Is there a better way? Is there a function corresponding to the "save" command? ------------------------------------------------------------- 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 -------------------------------------------------------------