help-octave
[Top][All Lists]
Advanced

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

Re: run Octave from Excel


From: Andy Adler
Subject: Re: run Octave from Excel
Date: Thu, 30 Oct 2003 11:12:37 -0500 (EST)

On Thu, 30 Oct 2003, Christoph Dalitz wrote:

> On Thu, 30 Oct 2003 00:26:24 -0800 (PST)
> albert treblataf <address@hidden> wrote:
> >
> > shell("C:\Program Files\GNU Octave\bin\octave-2.1.42-p2atlas.exe 
> > -testscript.m")
> >
> > then it opens for an instant and then closes without doing anything.
> > any ideas?
> >
> The following should work:
>
>       shell("C:\Cygwin\bin\sh.exe -c 'octave $HOME/testscript.m'")
>
> where "C:\Cygwin" must be replaced with the root directory of your Cygwin 
> installation
> and "$HOME/testscript.m" with the Unix (!) full path of your octave script.
>
> Moreover make sure that C:\Cygwin\bin (or whatever that on your system is) is
> part of your search path.

While Albert didn't say what distribution of octave he's using, I'm
guessing its the one I prepared, judging by the file name.
This distribution has cygwin1.dll in the same bin directory as the
octave *.exe, so octave will have no problem starting.

The problems are:
   1. the minus sign. I don't understand why you would put -testscript

   2. the path. When octave is opened this way, the home directory
         will be wherever excel is at the moment. Octave has no way to
         know where to find testscript.m.
      One solution is to create a batch file that cd's to the correct
         directory first, then calls $PATH/octave.exe testscript.m
      Another is C:\path\to\octave C:/path/to/testscript.m
         note the different direction slashes. Be sure to quote spaces.

Andy



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