Refine factor
Option to produce additional output values between simulation time steps
Model Configuration Pane: Data Import/Export
Description
Specify the amount of additional output values for the variable-step solver to produce. A
refine factor of 1
specifies that the simulation produce the same
number of output values. A refine factor of 2
specifies that the
simulation produce twice the number of output values. The solver does not produce these
values by taking additional major time steps.
This parameter is supported only for simulations that use a variable-step solver. In simulations that use a fixed-step solver, this parameter is ignored.
This parameter is also ignored in simulations of purely discrete models, which contain no continuous states.
The software always simulates purely discrete models using the discrete solver for the selected solver type, regardless of the value you specify for the Solver parameter.
Dependencies
To enable this parameter, set Output options to Refine output
.
Settings
1
(default) | positive integer greater than zeroBy default, the refine factor is 1
, and the simulation does not produce additional output values. When you specify a refine factor of 2
, the simulation produces approximately twice the number of output values by calculating an additional output value midway between each major time step.
Recommended Settings
The table summarizes recommended values for this parameter based on considerations related to code generation.
Application | Setting |
---|---|
Debugging | No impact |
Traceability | No impact |
Efficiency | No recommendation |
Safety precaution | No recommendation |
Programmatic Use
Parameter: Refine |
Type: string | character vector |
Value: positive integer greater than zero |
Default: '1' |