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: Paul Kienzle
Subject: Re: Operating System Commands from Octave
Date: Fri, 19 Apr 2002 17:38:15 -0400

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
        
On Fri, Apr 19, 2002 at 05:08:26PM -0400, Chuck Conner wrote:
> Is there a way to execute an MS-DOS (Command Prompt) command from (the 
> Windows version of) octave?  (In MatLab, you would either preface the command 
> with an exclamation point "!", or use the dos() command.)
> 
> -Chuck Conner
> 



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