MATLAB: How to get the sample time which Simulink uses for simulation from the command line in MATLAB 7.7(R2008b)

samplingsimulinksolvertime

I want to be able to get the sampling time from command line. The step size is set to auto and the solver is set to Fixed step.

Best Answer

In order to find out the sample times from the command line in MATLAB 7.7 (R2008b), one needs to compile the model at command prompt by using the following command:
[sys,x0,str,ts] = model([],[],[],'compile');
ts
where "model" stands for the name of the model. The sample times are stored in 'ts'.