MATLAB: Simulink – Modifying Data Inspector sample time
data inspectorsimulink
Hello,
How do I modify the sample time for the signal logging in the data inspector in Simulink? By default, it seems to just use my model's fundamental sample time (1 ms). Thanks!
Best regards,
Niklas
Best Answer
The Simulation Data Inspector cannot log data with a higher sampling rate than the base sample rate of your model.
If you want a slower sample rate for the Simulation Data Inspector, you can log signals coming out of a Rate Transition block which uses a slower sample rate.
Your solver should be fixed size, and the fixed step size can be set at simulation->Configuration Parameters-> Fixed-step size (fundamental sample time)
There is no Simulink block in the 'Sinks' library that allows you to specify the sample rate at which simulation data needs to be logged.
However, the attached 'Signal_log.mdl' model demonstrates how this can be done by using basic Simulink blocks. In this model, the Rate Transition block is used to log data at any specified sample rate (which is specified in the subsystem mask).
Best Answer