I get this following error (MATLAB 2013a) when building a custom task in Simulink.
Error evaluating Stateflow parameter data ‘RAND_MAX’ in its parent workspace. Caused by: Undefined function or variable ‘RAND_MAX’.
The only thing I know which might have caused this error is the export of task model from MATLAB 2015a to MATLAB 2013a. I tried keeping all model configuration parameters similar to the default for a task in MATLAB 2013a (which builds fine) but even then I get this error. I also tried putting # inlcude<stdlib.h> in Source FIle in model configuration parameters as instructed in the documentation, but the error still persists.
Please let me know what can be done to resolve this error.