help-octave
[Top][All Lists]
Advanced

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

Re: running octave from a c++ program


From: Przemek Klosowski
Subject: Re: running octave from a c++ program
Date: Mon, 24 Oct 2011 14:12:34 -0400
User-agent: Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20110930 Thunderbird/7.0.1

On 10/23/2011 02:01 PM, Gamaliel Isaac wrote:
I would like to run a matlab program on an MRI scanner. The MRI scanner
uses software written in C++ which I can modify. One option is to
translate the code into C++ which could be very time consuming
especially since I would have to implement matlab functions. I would
rather interface the c++ program with octave and run the program that
way if that is possible. Is it and if so how would that be done?

Octave does offer a nice C++-callable API

          http://octave.sourceforge.net/coda/index.html

The question that always arises when combining native and interpreted code is "who's driving", i.e. which part is executing the main loop. Are you going to write some C++ code that the Octave interpreter will call? or do you expect the main loop of your application to be in C++, making occasional calls to the Octave libraries? From your question, it seems that you plan the latter, but it's easier and more flexible to do it the other way around---Octave does a lot of things already that you don't have to do by hand.

Another issue is if it is possible I don't have system administrator
access to the scanner and I doubt Siemens would install the software for
me. Their scanners have to work in a clinical environment and anything
they put on there has to be tested thoroughly to make sure it doesn't
interfere with scanner operation. If I could put an OCTAVE dll in a
directory though that would be OK. Is that possible?

Sure, it should be doable.

If all this is not possible is it possible to get matlab functions that
were translated into C?

There is a Matlab toolbox that allows that, yes.


reply via email to

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