list
List start points
Description
Examples
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 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
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:
listgenerates points uniformly within bounds.If a component has no bounds,
listuses a lower bound of-ArtificialBoundand an upper bound ofArtificialBound.If a component has a lower bound
lbbut no upper bound,listuses an upper bound oflb + 2*ArtificialBound.Similarly, if a component has an upper bound
ubbut no lower bound,listuses a lower bound ofub - 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
Start points, returned as a k-by-n
matrix. Each row of the matrix represents one start point.
If you list a
CustomStartPointSet, thenkis theNumStartPointsproperty, andnis theStartPointsDimensionproperty.If you list a
RandomStartPointSet, thenkis theNumStartPointsproperty, andnis inferred from thex0field of theproblemstructure.
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.
Website auswählen
Wählen Sie eine Website aus, um übersetzte Inhalte (sofern verfügbar) sowie lokale Veranstaltungen und Angebote anzuzeigen. Auf der Grundlage Ihres Standorts empfehlen wir Ihnen die folgende Auswahl: .
Sie können auch eine Website aus der folgenden Liste auswählen:
So erhalten Sie die bestmögliche Leistung auf der Website
Wählen Sie für die bestmögliche Website-Leistung die Website für China (auf Chinesisch oder Englisch). Andere landesspezifische Websites von MathWorks sind für Besuche von Ihrem Standort aus nicht optimiert.
Amerika
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- 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)