list
List start points
Description
Examples
Create CustomStartPointSet
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
.
isequal(ptmatrix,tpts)
ans = logical
1
Create RandomStartPointSet
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
tpoints
— Start points
CustomStartPointSet
object
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)
rs
— Start points description
RandomStartPointSet
object
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 ofArtificialBound
.If a component has a lower bound
lb
but no upper bound,list
uses an upper bound oflb + 2*ArtificialBound
.Similarly, if a component has an upper bound
ub
but no lower bound,list
uses a lower bound ofub - 2*ArtificialBound
.
problem
— Problem description
problem structure
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
points
— Start points
k
-by-n
matrix
Start points, returned as a k
-by-n
matrix. Each row of the matrix represents one start point.
If you list a
CustomStartPointSet
, thenk
is theNumStartPoints
property, andn
is theStartPointsDimension
property.If you list a
RandomStartPointSet
, thenk
is theNumStartPoints
property, andn
is inferred from thex0
field of theproblem
structure.
Version History
Introduced in R2010a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)