I have a problem with a Level-2 M-file in Simulink. In my Simulink-model the Level-2 M-file should function as a switch, depending on the parameter "T". "S" is the value of the only input to my function.
block.OutputPort(1).Data = T;
(Well it´s maybe not so professionally written..) The parameter "T" should be a paramter , that has the value 0 at the start of my model. And it changes the value during each calculation-loop.
Now the simple problem: How can I set the value of "T" to zero at the start of my model ? If I´m writting T=0 in ModelProperties/Callbacks/InitFcn, I receive the error "Undefined function or variable 'T' in my M-file.