From: Ben Abbott <address@hidden>
To: hafedh trigui <address@hidden>
Cc: "address@hidden" <address@hidden>; "address@hidden" <address@hidden>
Sent: Friday, November 25, 2011 6:23:18 PM
Subject: Re: passing and modifying structures in mex octave functions
On Nov 25, 2011, at 2:58 PM, hafedh trigui wrote:
> Hi
Ben,
>
> I wanted to pass a structure into a mex file and modify its fields as required by the algorithm.
> In my full code, the same structure will be passed to many C++ functions and modified as required. I only attached a snapshot of the code (Visual Studio C++ 2005) highlighting the problem.
> The test.m function (in debug directory) specifies the structure to be passed to the mex function.
>
> I'll greatly appreciate your help.
>
> Thank you in advance,
> Hafedh
I'm not familiar with this subject, but I noticed there is a section in the manual on this subject. An example is included.
http://www.gnu.org/software/octave/doc/interpreter/Structures-with-Mex_002dFiles.htmlMy c/c++ experience is very limited (close to nil). I
expect you'll be able to solve your problem faster than I can, but if the link above doesn't help, I can give it a try.
Ben