46 nparams = length(params);
50 rescaler = (this.
Samples/prod([params(:).Desired]))^(1/nparams);
52 ranges =
cell(nparams,1);
57 num = round(p.Desired * rescaler);
58 ranges[pidx] =
sort(rand(1,num) * (p.MaxVal-p.MinVal) + p.MinVal);
62 samples = ranges[pidx];
Collection of generally useful functions.
WeightedRandomSampler: Computes random samples using the Desired fields of the parameters.
static function comb = createCombinations(ranges, varargin)
Creates the cartesian product of the vectors passed as a matrix containing elements of each vector pe...
A MatLab cell array or matrix.
sort
ort the handle objects in any array in ascending or descending order.
Samples
The number of samples to take.
RandomSampler Selects Samples many random parameters.
function samples = performSampling(params)
Randomly generates input samples by choosing params and time parameter by chance. ...