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.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- 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)