Can I use the "Simulink.​Simulation​Input" object to specify different values for data dictionary parameters?

I want to use the "Simulink.SimulationInput" object to specify different values for data dictionary parameters and then run the simulations using the "sim" command. How can I do that?

 采纳的回答

You can use the "Simulink.SimulationInput" object and the "setVariable" command to do this. Refer to the example below.
 
for i = 1:length(N_simulations)
    simIn(i) = Simulink.SimulationInput('example_model');
    simIn(i) = setVariable(simIn(i),'parameter',parameter_value);
end
simOut=sim(simIn);

更多回答(0 个)

类别

在 帮助中心 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

产品

版本

R2019a

标签

尚未输入任何标签。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by