| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Simulink Design Optimization |
| Contents | Index |
| Learn more about Simulink Design Optimization |
simset(proj,'setting1',value1,'setting2',value2,...)
simset(proj,'setting1',value1,'setting2',value2,...) modifies the simulation settings within the response optimization project, proj. The value of the simulation setting, setting1, is set to value1, setting2 is set to value2, etc.
For a detailed list of simulation options and the possible values they can take, see the reference page for the Simulink function simset. The default values of the simulation options for the project are the same as those used by the Simulink model the project is associated with. Changes that are made to the project's simulation settings are only used during simulations that are run as part of the optimization, and they do not affect the simulation settings for the model.
Create a response optimization project for the srotut1 model.
proj=newsro('srotut1','Kint');Get the simulation settings for this project.
simoptions = simget(proj)
This returns
simoptions =
AbsTol: 1.0000e-006
FixedStep: 'auto'
InitialStep: 'auto'
MaxStep: 'auto'
MinStep: 'auto'
RelTol: 1.0000e-003
Solver: 'ode45'
ZeroCross: 'on'
StartTime: '0.0'
StopTime: '50'
Use simset to change the solver type to ode23 and the absolute tolerance to 1e-7.
simset(proj,'Solver','ode23','AbsTol',1e-7)
Check the new values:
sim_settings=simget(proj); sim_settings.Solver
This shows that the solver is now set to ode23.
ans = ode23
Check the absolute tolerance:
sim_settings.AbsTol
This value is now set to 1e-7.
ans = 1.0000e-007
![]() | simget | spetool | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |