Why does loading a MAT file that contains a function handle from a standalone C application return incorrect values?
이전 댓글 표시
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.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Write C Functions Callable from MATLAB (MEX Files)에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!