help-octave
[Top][All Lists]
Advanced

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

Re: Autorun .m file


From: David Grundberg
Subject: Re: Autorun .m file
Date: Fri, 04 Jun 2010 08:27:00 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4

On 06/04/2010 05:04 AM, Ian Journeaux wrote:
I was wondering if it was possible to autorun a specific .m file when
Octave starts and te automatically close Octave when the .m file
finishes executing.


You could do this by entering a call to the .m-file in the Octave startup file, followed by an exit. But I don't think you'd like to do that, because it would make it harder to get to the Octave prompt.

Another related question, is it possible to feed commands from a
separate program to Octave, i.e. make Octave run a specific .m file.


If you have a running Octave process, and you want it to run a m-file through inter-process communication, you'll have to make some major hacking. On the other hand, it's possible to run as many Octave processes you'd like, so why not just start a new Octave process to run the m-file.

You can start an Octave process to execute a m-file and then exit when it's done. Just call:

octave -f aspecificfile.m

On windows, you can copy the Octave link from the start menu and edit its properties to add the extra arguments.

David


reply via email to

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