help-octave
[Top][All Lists]
Advanced

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

Re: Running External Programs


From: James Sherman Jr.
Subject: Re: Running External Programs
Date: Mon, 14 Jun 2010 13:09:59 -0400

On Mon, Jun 14, 2010 at 12:00 PM, Ashley Whitney-Rawls <address@hidden> wrote:
Greetings,
 
Does Octave have the ability run external programs through the DOS prompt and transfer back to the prompt screen when the job is complete like MATLAB?  How is this done?

I believe the system command is what you're looking for.

> system("command_to_execute");

Can Octave read input files? 
Yes.  Though I'm not sure if you mean scripts or data files.
 
Are these just created in text files? 
Scripts are text files yes, though they are usually suffixed as .m files.  Data input files can be ASCII/text files as well.
 
Can they be left as .txt files?
Yes.
 
  How are they called in the prompt window?
If you mean scripts (which, with this question, I believe you are), if you have them named as script.m, then you can either change your current path to the directory your script is in (using cd):
> cd path_of_script_directory
> script
or you can add the path that the directory is in, then call the script:
> addpath path_of_script_directory
> script

Hope this helps.
James

reply via email to

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