The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Pass arbitrary pointer type between mex functions
Replies: 6   Last Post: Dec 4, 2012 6:24 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Bruno Luong

Posts: 9,822
Registered: 7/26/08
Re: Pass arbitrary pointer type between mex functions
Posted: May 24, 2012 2:37 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Cody" wrote in message <jpk840$ko1$>...

> Thanks for the response James. Since there's not an elegant solution to pass this pointer back to the Matlab workspace,

Why not cast the pointer to uint64, or double, or 1x8 uint8 array (whatever that has the same size as a ppointer) and return it to MATLAB as mxArray?

>do you know if there is a way I can store the user defined pointer in a memory location so that different mex functions, called separately from the Matlab command line can access this memory location and therefore the pointer?

Just pass the pointers in mxArray as I explain above.


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2017. All Rights Reserved.