| Using Simulink | Search  Help Desk |
Model Parameters
This table lists and describes parameters that describe a model. The parameters appear in the order they are defined in the model file, described in Appendix B. The table also includes model callback parameters, described in "Using Callback Routines". The Description column indicates where you can set the value on the Simulation Parameters dialog box. Model parameters that are simulation parameters are described in more detail in Chapter 4. Examples showing how to change parameters follow the table. Parameter values must be specified as quoted strings. The string contents depend on the parameter and can be numeric (scalar, vector, or matrix), a variable name, a filename, or a particular value. The Values column shows the type of value required, the possible values (separated with a vertical line), and the default value, enclosed in braces.| Parameter |
Description |
Values |
|
Name
|
Model name
|
text
|
|
Version
|
Simulink version used to modify the model (read-only)
|
(release)
|
|
SimParamPage
|
Simulation Parameters dialog box page to display (page last displayed)
|
{Solver} | WorkspaceI/O | Diagnostics
|
|
SampleTimeColors
|
Sample Time Colors menu option
|
on | {off}
|
|
InvariantConstants
|
Invariant constant setting
|
on | {off}
|
|
WideVectorLines
|
Wide Vector Lines menu option
|
on | {off}
|
|
ShowLineWidths
|
Show Line Widths menu option
|
on | {off}
|
|
PaperOrientation
|
Printing paper orientation
|
portrait | {landscape}
|
|
PaperPosition
|
Position of diagram on paper
|
[left, bottom, width, height]
|
|
PaperPositionMode
|
Paper position mode
|
auto | {manual}
|
|
PaperSize
|
Size of PaperType in PaperUnits
|
[width height] (read only)
|
|
PaperType
|
Printing paper type
|
{usletter} | uslegal | a0 | a1 | a2 | a3 | a4 | a5 | b0 | b1 | b2 | b3 | b4 | b5 | arch-A | arch-B | arch-C | arch-D | arch-E | A | B | C | D | E | tabloid
|
|
PaperUnits
|
Printing paper size units
|
normalized | {inches} | centimeters | points
|
|
StartTime
|
Simulation start time
|
scalar {0.0}
|
|
StopTime
|
Simulation stop time
|
scalar {10.0}
|
|
Solver
|
Solver
|
{ode45} | ode23 | ode113 | ode15s | ode23s | ode5 | ode4 | ode3 | ode2 | ode1 | FixedStepDiscrete | VariableStepDiscrete
|
|
RelTol
|
Relative error tolerance
|
scalar {1e-3}
|
|
AbsTol
|
Absolute error tolerance
|
scalar {1e-6}
|
|
Refine
|
Refine factor
|
scalar {1}
|
|
MaxStep
|
Maximum step size
|
scalar {auto}
|
|
InitialStep
|
Initial step size
|
scalar {auto}
|
|
FixedStep
|
Fixed step size
|
scalar {auto}
|
|
MaxOrder
|
Maximum order for ode15s
|
1 | 2 | 3 | 4 | {5}
|
|
OutputOption
|
Output option
|
AdditionalOutputTimes | {RefineOutputTimes} | SpecifiedOutputTimes
|
|
OutputTimes
|
Values for chosen OutputOption
|
vector {[]}
|
|
LoadExternalInput
|
Load input from workspace
|
on | {off}
|
|
ExternalInput
|
Time and input variable names
|
scalar or vector [t, u]
|
|
SaveTime
|
Save simulation time
|
{on} | off
|
|
TimeSaveName
|
Simulation time name
|
variable {tout}
|
|
SaveState
|
Save states
|
on | {off}
|
|
StateSaveName
|
State output name
|
variable {xout}
|
|
SaveOutput
|
Save simulation output
|
{on} | off
|
|
OutputSaveName
|
Simulation output name
|
variable {yout}
|
|
LoadInitialState
|
Load initial state
|
on | {off}
|
|
InitialState
|
Initial state name or values
|
variable or vector {xInitial}
|
|
SaveFinalState
|
Save final state
|
on | {off}
|
|
FinalStateName
|
Final state name
|
variable {xFinal}
|
|
LimitMaxRows
|
Limit output
|
on | {off}
|
|
MaxRows
|
Maximum number of output rows to save
|
scalar {1000}
|
|
Decimation
|
Decimation factor
|
scalar {1}
|
|
AlgebraicLoopMsg
|
Algebraic loop diagnostic
|
none | {warning} | error
|
|
MinStepSizeMsg
|
Minimum step size diagnostic
|
{warning} | error
|
|
UnconnectedInputMsg
|
Unconnected input ports diagnostic
|
none | {warning} | error
|
|
UnconnectedOutputMsg
|
Unconnected output ports diagnostic
|
none | {warning} | error
|
|
UnconnectedLineMsg
|
Unconnected lines diagnostic
|
none | {warning} | error
|
|
ConsistencyChecking
|
Consistency checking
|
on | {off}
|
|
ZeroCross
|
Intrinsic zero crossing detection (see "Zero Crossings")
|
{on} | off
|
|
CloseFcn
|
Close callback
|
command or variable
|
|
PreLoadFcn
|
Pre-load callback
|
command or variable
|
|
PostLoadFcn
|
Post-load callback
|
command or variable
|
|
SaveFcn
|
Save callback
|
command or variable
|
|
StartFcn
|
Start simulation callback
|
command or variable
|
|
StopFcn
|
Stop simulation callback
|
command or variable
|
|
BooleanDataType
|
Enable Boolean mode
|
on | {off}
|
|
BufferReuse
|
Enable reuse of block I/O buffers
|
{on} | off
|
mymodel system.
This command sets the simulation start and stop times.
set_param('mymodel','StartTime','5','StopTime','100')
This command sets the solver to ode15s and changes the maximum order.
set_param('mymodel','Solver','ode15s','MaxOrder','3')
This command associates a SaveFcn callback.
set_param('mymodel','SaveFcn','my_save_cb')