Archive for the 'Matlab/Simulink' Category

How to access the global sample time in Matlab/Simulink

How to access the global sample time (from the Configuration Parameters dialog) in order to use it in a script for example?

get_param is the name of the function you have to use

get_param(bdroot, ‘ObjectParameters’) shows you all parameters from the dialog Configuration Parameters. Now you just have to find the correct one. The global sample time is named FixedStep.

get_param(bdroot, ‘FixedStep’) gives you the global sample time.