MATLAB: How to get the inherited sample time of a signal in Simulink R2014b

simulink

I want to use the inherited sample time of a signal as a value in my algorithm. Is there a way to get the sample time of a signal in Simulink?

Best Answer

The Weighted Sample Time block allows you to extra the sample time of a Simulink signal. On the block parameters, setting "Operation" to "Ts only" makes the block output the sample time. Changing "Operation" also allows additional math operations between the input signal and the sample time of the signal.