MATLAB: Set simulink time step

odesimulink

I want to simulate a dynamics system 'mdl' using sim('mdl',parameters), and I want to get the simulation output at some specific time points, instead of time points determined by the ode solver. Is there any way that I can specify the time step of the simulink ode solver?
Like when using ode45, I can use ode45(odefun,tspan,y0) with tspan=0:0.1:1, can I still get simulation output at time points 0:0.1:1 with simulink?

Best Answer

For variable-step solvers, you can do this by setting the Output options parameter on the Import/Export Pane of the Configuration Parameters window to either 'Produce additional output' or 'Produce specified output only' and entering the time array in Output times.