simulink仿真结果数据采集
조회 수: 16 (최근 30일)
이전 댓글 표시
simulink中的仿真需要10秒才能稳定运行,我的输入有1000组,怎么快速并行采集稳定运行后的数据
The simulation in Simulink takes 10 seconds to stabilize. With 1,000 input sets, how can I quickly and parallelly collect data after the stable operation
댓글 수: 0
채택된 답변
Chuguang Pan
2025년 11월 25일 11:54
@张海云. You can use Simulink.SimulationInput objects to configure 1000 models with different setting. Then, you can use parsim to simulate these 1000 models in parallel and obtain the output data through the returned Simulink.SimulationOutput objects. For instance,
simParams = rand(1000,1); % 1000 different simulation parameters
for num = numel(simParams):-1:1
simIn(num) = Simulink.SImulationInput("Model_Name");
simIN(num) = simIn(num).setVariable("Model_Variable_Name", simParams(num));
end
simOut = parsim(simIn,"ShowSimulationManager","on");
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Run Multiple Simulations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!