How to run Simulink model in a loop with continuously changing one input parameter?
이전 댓글 표시
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).
답변 (3개)
Sulaymon Eshkabilov
2019년 4월 10일
2 개 추천
% 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
Avinash Prakash
2016년 6월 15일
편집: Avinash Prakash
2016년 6월 15일
댓글 수: 1
Amardeep Mishra
2018년 10월 23일
How to force the for loop to continue even when sim() returns NaN or infinity?
Andreas Goser
2016년 6월 14일
0 개 추천
Most users run this through a MATLAB script and the SIM command. You can also leverage commands like SET_PARAM.
카테고리
도움말 센터 및 File Exchange에서 Simulink에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!