| Using Simulink | ![]() |
Specifying Output Options
The Output options list on the Data Import/Export configuration pane (Data Import/Export Pane) enables you to control how much output the simulation generates. You can choose from three options:
Refining Output
The Refine output choice provides additional output points when the simulation output is too coarse. This parameter provides an integer number of output points between time steps; for example, a refine factor of 2 provides output midway between the time steps, as well as at the steps. The default refine factor is 1.
To get smoother output, it is much faster to change the refine factor instead of reducing the step size. When the refine factor is changed, the solvers generate additional points by evaluating a continuous extension formula at those points. Changing the refine factor does not change the steps used by the solver.
The refine factor applies to variable-step solvers and is most useful when you are using ode45. The ode45 solver is capable of taking large steps; when graphing simulation output, you might find that output from this solver is not sufficiently smooth. If this is the case, run the simulation again with a larger refine factor. A value of 4 should provide much smoother results.
| Note This option helps the solver to locate zero crossings (see Zero-Crossing Detection). |
Producing Additional Output
The Produce additional output choice enables you to specify directly those additional times at which the solver generates output. When you select this option, Simulink displays an Output times field on the Data Import/Export pane. Enter a MATLAB expression in this field that evaluates to an additional time or a vector of additional times. The additional output is produced using a continuous extension formula at the additional times. Unlike the refine factor, this option changes the simulation step size so that time steps coincide with the times that you have specified for additional output.
Producing Specified Output Only
The Produce specified output only choice provides simulation output only at the specified output times. This option changes the simulation step size so that time steps coincide with the times that you have specified for producing output. This choice is useful when you are comparing different simulations to ensure that the simulations produce output at the same times.
Comparing Output Options
A sample simulation generates output at these times:
Choosing Refine output and specifying a refine factor of 2 generates output at these times:
Choosing the Produce additional output option and specifying [0:10] generates output at these times
and perhaps at additional times, depending on the step size chosen by the variable-step solver.
Choosing the Produce specified output only option and specifying [0:10] generates output at these times:
| Limiting Output | Configuration Sets | ![]() |
© 1994-2005 The MathWorks, Inc.