From: Tony Kirke on
Hi,
I know how to save multiple vectors, scalars, etc to a .mat file from C/C++ code.
But can I save a structure of variables so that when I load in matlab I will see that same structure? Obviously each variable can be written but how to tell the file that it is not a global variable but part of a structure?
thanks
From: dpb on
Tony Kirke wrote:
> Hi,
> I know how to save multiple vectors, scalars, etc to a .mat file from
> C/C++ code.
> But can I save a structure of variables so that when I load in matlab I
> will see that same structure? Obviously each variable can be written but
> how to tell the file that it is not a global variable but part of a
> structure?
> thanks

That's what mex file interfaces are for. They present an API to
interface to the Matlab data structures.

--