Automatically save output variable of multiple-run simulation with different names
이전 댓글 표시
Hi,
I am running a Matlab script which opens up a Simulink model and runs the simulation several times within a for-loop. I have a Uniform Random Number Block in my model, so the output of the Simulation will be different in each run. The problem I have is that if I run the simulation 20 times via my Matlab script, the output variable is overwritten in the workspace after each run. Is there a way to save the output variable in my workspace after each run with a different name and still be able to have my script run the simulation as many times as I want automatically?
Thank you, Fabian
댓글 수: 3
sudhansu samal
2016년 12월 19일
I have facing the same problem that how to rum the simulink model multiple times and store the data, can u help me.
amit kumar
2021년 11월 30일
how i can run matlab simulink model multiple times using foor loop ? can you please help me
Walter Roberson
2021년 11월 30일
N = 5;
outputs = cell(N,1);
for K = 1 : N
outputs{K} = sim('modelName');
end
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Simulink에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!