Main Content


List start points



points = list(tpoints) returns the points inside the tpoints CustomStartPointSet object.


points = list(rs,problem) generates and returns points described by the rs RandomStartPointSet object and problem.


collapse all

Create a CustomStartPointSet object with 64 three-dimensional points.

[x,y,z] = meshgrid(1:4);
ptmatrix = [x(:),y(:),z(:)] + [10,20,30];
tpoints = CustomStartPointSet(ptmatrix);

tpoints is the ptmatrix matrix contained in a CustomStartPointSet object.

Extract the original matrix from the tpoints object by using list.

tpts = list(tpoints);

Check that the tpts output is identical to ptmatrix.

ans = logical

Create a RandomStartPointSet object for 40 points.

rs = RandomStartPointSet('NumStartPoints',40);

Create a problem with 3-D variables, lower bounds of 0, and upper bounds of [10,20,30].

problem = createOptimProblem('fmincon','x0',rand(3,1),'lb',zeros(3,1),'ub',[10,20,30]);

Generate a random set of 40 points consistent with the problem.

points = list(rs,problem);

Examine the maximum and minimum generated components.

largest = max(max(points))
largest = 29.8840
smallest = min(min(points))
smallest = 0.1390

Input Arguments

collapse all

Start points, specified as a CustomStartPointSet object. list extracts the points into a matrix where each row is one start point.

Example: tpoints = CustomStartPointSet([1:5;4:8].^2)

Start points description, specified as a RandomStartPointSet object. list generates start points using the NumStartPoints (number of points) and ArtificialBound (artificial bounds) properties of rs. list uses the x0 field in problem to determine the number of variables in the start points. list uses the bounds in problem as follows:

  • list generates points uniformly within bounds.

  • If a component has no bounds, list uses a lower bound of -ArtificialBound and an upper bound of ArtificialBound.

  • If a component has a lower bound lb but no upper bound, list uses an upper bound of lb + 2*ArtificialBound.

  • Similarly, if a component has an upper bound ub but no lower bound, list uses a lower bound of ub - 2*ArtificialBound.

Problem description, specified as a problem structure. Create a problem structure using createOptimProblem. list uses only the lower and upper bounds in problem, as described in rs, and uses the x0 field in problem to determine the number of variables.

Data Types: struct

Output Arguments

collapse all

Start points, returned as a k-by-n matrix. Each row of the matrix represents one start point.

  • If you list a CustomStartPointSet, then k is the NumStartPoints property, and n is the StartPointsDimension property.

  • If you list a RandomStartPointSet, then k is the NumStartPoints property, and n is inferred from the x0 field of the problem structure.

Version History

Introduced in R2010a