This feature has been added in Simulink 6.2 (R14SP2). Now, Simulink creates the signal logging variable based on the configuration parameters of the model regardless of the syntax for the SIM command that you use.
Additionally, you can use the SIMSET command to override the model parameters. For example,
opts = simset('SignalLogging', 'on', 'SignalLoggingName', 'my_logsout_var'); [t,x,y]=sim('test.mdl',10,opts);
enables Signal Logging and creates a variable named 'my_logsout_var', even if Signal Logging is disabled in the model's configuration parameters. If you are using a previous version, read the following:
The ability to generate the "logsout" variable when using the the [t,x,y] = sim('model_name') syntax is not available in Simulink 6.1 (R14SP1). There are no workarounds.
Best Answer