simulink仿真结果数据采集

16 ビュー (過去 30 日間)
张海云
张海云 2025 年 11 月 25 日 7:57
回答済み: Chuguang Pan 2025 年 11 月 25 日 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

採用された回答

Chuguang Pan
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 件)

カテゴリ

Help Center および File ExchangeRun Multiple Simulations についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by