[Top][All Lists]

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

Re: using octave from windows application

From: Paul Kienzle
Subject: Re: using octave from windows application
Date: Mon, 2 Apr 2007 22:10:20 -0400

On Apr 2, 2007, at 8:52 PM, Muthiah Annamalai wrote:

On Mon, 2007-04-02 at 11:33 -0700, Jain, Shrish wrote:
Hi All,

I want to run matlab scripts from my windows application, using
octave. I installed Octave-Forge
Files(, and
able to run octave on windows. However I am not sure whether it is
possible whether I can call octave library from my program and run
matlab scripts. It would be great if some one can give me pointers on
the same.



If you are using a really powerful computer, a silly way to do this
would be to

0. Write your function & invocation into a temp file.
1. use 'system()' call in your Windows program & invoke Octave with
temp file as argument; which is the easiest way to do it.

Dont tell at me for performance. I know its really bad.

Advanced operations are

1. Using pipes (popen, pclose)
2. write your program in Octave & use pipes in Octave!
   (Converse of algo proposed above)
3. Embed Octave in your application by compiling it within.
   See docs at ? CODA manual link on Octave-forge site.

Use TCP/IP. Run an octave server using listen(portnum) which you can send commands and receive results. See octave-forge/main/miscellaneous/doc/listen.txt for a description of the protocol and octave-forge/extra/soctcl directory for an example of calling it from Tcl/Tk. It works for me under Windows, OS X and Linux.

        - Paul

reply via email to

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