Convert MATLAB structure to C-style structure for use with shared C library
creates S
= libstruct(structtype
)NULL
pointer to MATLAB®
libstruct
object S
.
creates pointer initialized to S
= libstruct(structtype
,mlstruct
)mlstruct
.
Use with libraries that are loaded using the loadlibrary
function.
You can only use the libstruct
function on scalar
structures.
When converting a MATLAB structure to a libstruct
object, the structure
must adhere to the requirements listed in Structure Argument Requirements.
If a function in the shared library has a structure argument, use
libstruct
to create the argument. The
libstruct
function creates a C-style structure that you
pass to functions in the library. You handle this structure in MATLAB as you would a true MATLAB structure.