[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: passing and modifying structures in mex octave functions
From: |
Ben Abbott |
Subject: |
Re: passing and modifying structures in mex octave functions |
Date: |
Fri, 25 Nov 2011 18:23:18 -0500 |
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.html
My 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