Hi all,
I have a script that should initialize a class that I want to use in Simulink using an (interpreted) Matlab System block. This script outputs a structure, e.g.:
struct = initializationScript;
The initialization should be done only once. I am aware that the method setupImpl should be used for initialization, but don't want to copy the content of the initialization script inside this method, since it is pretty large.
I tried to call the initializationScript script from the setupImpl, but I get the error:
Problem creating simulation targer MEX-file for model ... This text contains non-empty top-level expressions. It appears to be a script...
I wonder if there is a way to call initialization scripts in the setupImpl method.
Thanks!
Cheers,
Bruno