simulink仿真结果数据采集
16 views (last 30 days)
Show older comments
张海云
on 25 Nov 2025 at 7:57
Answered: Chuguang Pan
on 25 Nov 2025 at 11:54
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 Comments
Accepted Answer
Chuguang Pan
on 25 Nov 2025 at 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 Comments
More Answers (0)
See Also
Categories
Find more on Run Multiple Simulations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!