I was shocked by the segmentation error in MATLAB. It looks like this was caused by an anonymous function loaded from the mat file. The initial descriptor of the anonymous function:
@(x)scaledNlfun(x,@logexp1,1e3)
But when it is loaded, it becomes:
@sf%1@(x)scaledNlfun(x,@logexp1,1e3)
Everything seems to be fine when I call it on the command line, but it creates a segmentation fault (or segmentation violation) in the function . Not a function call, but a few lines after that. In debug mode, if I go through the instructions, that's good too.
Stack trace shows group
[ 0] 0x00002b20b97baba4 /usr/local/MATLAB/R2013a/bin/glnxa64/libmwm_interpreter.so+04127652
and this happens both on MATLAB 2012a and 2013a on Linux 2.6.18-371.3.1.el5 SMP.
parfor '- v7.3', , , . , , , matlab load .
, . parfor "-v7.3", . 80 , Matlab ( 1 ).
, -, "@sf%"? ( stateflow)