MATLAB: Is it possible to log simulation data at any specified sample rate

defaultdifferentsamplesavesimulinktimeworkspace

I would like to log simulation data at a sample rate that I specify.

Best Answer

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).