help-octave
[Top][All Lists]
Advanced

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

Re: how to call a octave function from c code


From: Michael Goffioul
Subject: Re: how to call a octave function from c code
Date: Sun, 5 Jan 2014 09:57:53 -0500

On Sun, Jan 5, 2014 at 8:19 AM, osamahameed <address@hidden> wrote:
this tutorial is difficult . i cannot understand it can you write a simple
code to call the function . my function is addition.m how i can call it in a
simple c code

Calling the function is easy, you would typically use "feval" defined in parse.h. However, the biggest problem is how to create and initialize the octave interpreter. And this depends on your application. If you want to call it from a MEX or OCT file, then you don't need to do anything. If you want to call octave from another application, then you would typically create the octave interpreter in embedded mode, which is what the link mentioned by Carlo is about. This is probably the simplest example of embedding octave into an external application.

Michael.


reply via email to

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