Calling m file from class?
1 view (last 30 days)
I have a class A, and a file myinit.m.
myinit.m contains many variable initializations which are needed by the class A.
This is how I am using it:
a1 = A();
I would like to avoid the first line where myinit is called. I tried putting myinit into class constructor, however the variables are not permanent, and they go out of scope once constructor is exited, so the A.Run() does not have this variables.
Is it possible to call myinit from within the class?
Note that A.Run() calls a Simulink simulation sim('model') and this model needs all the myinit variables.