MATLAB DISCUSSION

What makes a MATLAB parameter sweep reproducible across machines?

Started by intellisense MATLAB parameter sweepreproducibilityrandom seedssimulation resultsexperiment tracking
3 replies 248 views 4 participants
Latest activity · 27 Sep 2026

What makes a MATLAB parameter sweep reproducible across machines?

intellisense MATLAB Forum
#1

For a parameter sweep comparing several controller settings, what should be recorded besides the final plot? Re-running a script later can produce different results if random disturbances, model files or dependency versions change.

How would you organize a sweep so another member can reproduce a particular run and understand why one parameter set was selected?

Community replies 3

Re: What makes a MATLAB parameter sweep reproducible across machines?

#2

Store the parameter values, initial conditions, simulation duration, solver settings and software version for every run. Give each result a stable run identifier and retain the source revision that produced it. Save raw or suitably complete numerical results as well as plots. A plot is good for discussion, but it often omits the information needed to recompute performance metrics.

Re: What makes a MATLAB parameter sweep reproducible across machines?

#3

Control random-number generation deliberately and record the generator state or seed strategy. For a fair comparison, use the same disturbance realizations across competing parameter sets where appropriate. Parallel execution needs an explicit reproducible stream strategy rather than relying on whichever worker starts first. Also separate the data used to select parameters from scenarios reserved for final evaluation.

Re: What makes a MATLAB parameter sweep reproducible across machines?

#4

Define the selection metric before inspecting the plots. Overshoot, settling time, energy use and constraint violations may lead to different winners. Record failed and unstable runs rather than silently dropping them. A useful report explains the tradeoff and includes enough information to rerun the selected case and a few nearby alternatives, so the result is not dependent on one fortunate trial.

TEP COMMUNITY