How to set Simulink solver type to fixed-step programmatically
You can set the solver type of a Simulink model to fixed-step programmatically using the set_param function in MATLAB. Here’s how you can do it:
set_solver_type.m
set_param(gcs, 'SolverName', 'FixedStepAuto')gcs stands for “get current system” and will return the name of the currently loaded Simulink model.
You can also specify FixedStepDiscrete or FixedStepContinuous depending on your requirements. For example:
example.txt
set_param(gcs, 'SolverName', 'FixedStepDiscrete')Check out similar posts by category:
Matlab/Simulink
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow