help-octave
[Top][All Lists]
Advanced

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

Re: Windows script


From: Andy Adler
Subject: Re: Windows script
Date: Tue, 2 Mar 2004 09:09:24 -0500 (EST)

On Tue, 2 Mar 2004 address@hidden wrote:

> >> I'm running Gnu Octave on a Windows XP, I wrote an Octave script that
> works
> >> great if I execute it inside the Gnu Octave environment.
> >> Now I need to execute this script from an external perl script, and get
> >> the result back in the Perl script to work on it. How can I execute Octave
> >> script from an external Perl script?
> >>
>
> >Give the path/file name of your script as a command line parameter to
> >the octave interpreter. E.g. from the Cygwin shell
> >
> >     echo "disp('Hallo');" > t.m
> >     octave -q t.m
> >
> >The same works from a perl script, eg. with the backquote operator.
>
> I think my problem is in getting the right octave exe file. I tried to use
> all exe file in Gnu Octave\bin directory but no one of them works with Perl
> script bactick operator giving back anything.

The octave path has spaces, you need to escape them

1. echo "1+1" | 'C:\Program Files\GNU Octave 2.1.50\bin\octave-2.1.50.exe' -q

or

2. add octave/bin to path
   echo "1+1" | octave-2.1.50.exe

or

3. Inline::Octave

   use Inline Octave => q{
     function showme(a); disp(a); endfunction
   }

   showme( 1+1 )


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]