help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Operating System Commands from Octave


From: John W. Eaton
Subject: Re: Operating System Commands from Octave
Date: Wed, 24 Apr 2002 00:35:22 -0500

On 19-Apr-2002, Paul Kienzle <address@hidden> wrote:

| Try the following untested code
| 
| function [status, text] = dos(cmd,echo) 
| 
|   if (nargin < 1 || nargin > 2)
|     usage ( "[status, text] = dos(cmd,'-echo')");
|   else
|     [text, status] = system(cmd);
|     if (nargin > 1) disp(text); endif
|   endif
| endfunction

Octave's system() function invokes a Unixy shell to run the
command(s), even when running on Windows systems, so my guess is that
this will come close, but not be completely compatible if the Matlab
dos() function actually calls the DOS command interpreter.

jwe



-------------------------------------------------------------
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
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]