Multiple parameter sweep in parfor using rapid accelarator mode
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I am looking at the below example model
Mb_sweep = Mb*(0.5:5:45.5);
iterations = length(Mb_sweep);
for i = iterations:-1:1
parameterSet(i) = Simulink.BlockDiagram.modifyTunableParameters(rtp, ...
'Mb',Mb_sweep(i));
end
simout(iterations) = Simulink.SimulationOutput;
I am trying to address a similar problem but with a larger list of parameters. i.e. instead of just Mb as in the above case, i have 5 parameters ( i have around 20 parameters but limiting to 5 as an example here). I have a cell array with a list of parameters (param_list) and a parameter sweep matrix with all the 5 parameters for 100 iterations (param_values (5 by 20 matrix). So below is how it looks
param_list ={a,b,c,d,e};
param_values=[1,2,3,4,5;... 100 rows];
Is there an elegant way to update all the 5 parameters using modifyTunableParameters but without hard coding them? I feel that it is silly to have to hard code a long list of parameters.
Once the parameterSet is created, i will be using it in a parfor loop. So, please consider the parfor limitations while providing a solution.
2 Kommentare
Swarooph
am 4 Nov. 2016
The example you are referring to actually shows rapid accelerator execution with parfor. It does look like you might need to create a parameter set using a for loop for each simulation run.
Just out of curiosity, when you say
Is there an elegant way to update all the 5 parameters using modifyTunableParameters but without hard coding them? I feel that it is silly to have to hard code a long list of parameters.
Do you have desired workflow in mind?
Antworten (0)
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!