Simulink.SimulationInput
创建 Simulink.SimulationInput
对象以对多个或单个仿真的模型进行更改
说明
Simulink.SimulationInput
对象允许您更改模型,并对包含更改的模型运行仿真。这些更改将暂时应用于模型。使用 Simulink.SimulationInput
对象,您可以更改初始状态、模型参数、模块参数、外部输入和变量。通过 Simulink.SimulationInput
对象,您还可以使用 setPreSimFcn
函数和 setPostSimFcn
指定在每个仿真的开始和结束时运行的 MATLAB® 函数。
创建对象
描述
输入参数
属性
对象函数
applyToModel | Apply configuration in SimulationIntput object to
model |
loadVariablesFromExternalSource | Load variables from a custom file into Simulink.SimulationInput
object |
loadVariablesFromMATFile | Load variables from MAT file into Simulink.SimulationInput
object |
removeVariable | Remove variable from SimulationInput or
Simulation object |
setBlockParameter | Set block parameter values for simulation using
SimulationInput or Simulation
object |
setExternalInput | Specify external input data for top-level input ports using
SimulationInput or Simulation
object |
setInitialState | Specify initial state for simulation using
SimulationInput or Simulation
object |
setPostSimFcn | Set MATLAB function to run after each simulation |
setPreSimFcn | Specify MATLAB function to run before start of each simulation on
Simulink.SimulationInput object |
setModelParameter | Set model parameter values for simulation using
SimulationInput or Simulation
object |
setVariable | 对 SimulationInput 对象设置变量值 |
showContents | View summary of specification in SimulationInput or
Simulation object |
validate | Validate contents of SimulationInput
object |
示例
版本历史记录
在 R2017a 中推出