How to run Simulink model in a loop with continuously changing one input parameter?
37 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I have built a Simulink model and it's inputs are given from scripts. Say suppose my input is "x" and output is "y", I have to simulate the model for different input values (x) and get corresponding outputs (y).
0 comentarios
Respuestas (3)
Sulaymon Eshkabilov
el 10 de Abr. de 2019
% Simulink won't run if the result comes to inf or NaN.
% A bit more complete answer of this problem:
y = cell(zeros(1,5));
for ii=1:5
OUT = sim('simulink_model.slx');
y{ii} = OUT;
end
0 comentarios
Avinash Prakash
el 15 de Jun. de 2016
Editada: Avinash Prakash
el 15 de Jun. de 2016
1 comentario
Amardeep Mishra
el 23 de Oct. de 2018
How to force the for loop to continue even when sim() returns NaN or infinity?
Andreas Goser
el 14 de Jun. de 2016
Most users run this through a MATLAB script and the SIM command. You can also leverage commands like SET_PARAM.
Ver también
Categorías
Más información sobre Simulink Environment Customization en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!