Why does loading a MAT file that contains a function handle from a standalone C application return incorrect values?
Show older comments
I have a standalone application, written in C, that loads a MAT file using the R2011b MAT file API. This MAT file has a struct "mats" with three fields, "a", "b", and "c". For example:
mats.a=1;
mats.b=@(x)x^2;
mats.c=3;
When this MAT file is loaded into the standalone application, field "a" is obtained correctly, and field "b" returns a NULL pointer as expected, as function handles cannot be represented in standalone applications.
However, field "c" returns as a struct pointer rather than a double pointer as it should be. It seems that the fields loaded after the function handle field are incorrectly represented.
Accepted Answer
More Answers (0)
Categories
Find more on Structures in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!