sim command for parameter sweeps

조회 수: 1 (최근 30일)
Mats
Mats 2015년 4월 1일
답변: Rahul Kumar 2018년 9월 1일
I have a Simulink model which i want to perform a parameter sweep on, code is as follows:
parfor n=1:N
nServ = Parm(n);
B = sim('sweep');
data{:,n} = B.get('yout');
time{:,n} = B.get('tout');
end
If I remove the par.. this works in serial but in parfor it complains on the first line (me setting nServ which sets number of servers available from a predefined array.
Is there any better way to run parameter sweeps that work both in serial and parallel?

답변 (1개)

Rahul Kumar
Rahul Kumar 2018년 9월 1일
R2017a introduced the parsim command to make it easier to do parameter sweeps (and more)
Please try it out and let us know if you have any questions.

카테고리

Help CenterFile Exchange에서 Schedule Model Components에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by