simulink仿真结果数据采集
16 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
张海云
le 25 Nov 2025 à 7:57
Réponse apportée : Chuguang Pan
le 25 Nov 2025 à 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 commentaires
Réponse acceptée
Chuguang Pan
le 25 Nov 2025 à 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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Run Multiple Simulations dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!