Simulink.Solver.FixedStepSolver Class
R2026bNamespace: Simulink.Solver
Description
Simulink.Solver.FixedStepSolver is the base class for authoring fixed-step
plugin solvers. Simulink® provides several built-in solvers that can simulate a wide range of systems.
However, the built-in solver integration algorithms are not necessarily ideal for all domains
and problems. Using the plugin solver interface, you can implement custom solver integration
algorithms for Simulink simulations.
At each time step in the simulation, a fixed-step solver:
Integrates continuous states by solving an initial value problem (IVP).
In the first time step, the initial state defines the initial value for the IVP. The solver computes the state at the next time step, which becomes the initial value in the next time step.
Advances time using a fixed step size.
The Fixed-step size (fundamental sample time) configuration parameter of the simulated system defines the step size.
To write a plugin solver, you define only the integration algorithm in the
step method. The Simulink environment provides solver services, such as zero-crossing detection. For more
information about Simulink solvers, see Choose a Solver.
To simulate a system using a plugin solver:
Save the class definition for the plugin solver in a location on the MATLAB® path or add the plugin solver location to the path.
Register the plugin solver using the
Simulink.Solver.registerfunction.Specify the Solver parameter as the name of the plugin solver.
To implement a variable-step plugin solver, use the class.Simulink.Solver.VariableStepSolver
The Simulink.Solver.FixedStepSolver class is a handle class.
Properties
Methods
Examples
Limitations
Plugin solvers do not support:
Rapid accelerator simulation
Software-in-the-loop (SIL) and processor-in-the-loop (PIL) simulation
Deployment with Simulink Compiler™
Production code generation using Simulink Coder™ or Embedded Coder®
Version History
Introduced in R2026b