octave-maintainers
[Top][All Lists]
Advanced

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

mex function behavior


From: John Swensen
Subject: mex function behavior
Date: Tue, 15 May 2007 10:30:33 -0400
User-agent: Thunderbird 2.0.0.0 (Macintosh/20070326)

Using the native method for extending Octave (e.g. DEFUN_DLD) I am able to declare multiple functions in a single file. All of these can access the same global data. With mex functions, on the other hand, it seems as if there can only be one declard per file and that I can't simply declare a global variable to share between all of them. I looks like I have to wrap a data structure and continually pass it back to Matlab/Octave and then back into the mexFunction again. As an alternative, I suppose I could put an object in the global workspace, but then I still have to continually wrap it up as a mex variable and unwrap it again when I want to use it.

Is there some way to put multiple mex functions in a single source file and/or share data between mex functions more easily?

John Swensen


reply via email to

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