MATLAB 帮助中心
本页采用了机器翻译。点击此处可查看最新英文版本。
列出起点
points = list(tpoints)
points = list(rs,problem)
points = list(tpoints) 返回 tpoints CustomStartPointSet 对象内部的点。
points
tpoints
CustomStartPointSet
示例
points = list(rs,problem) 生成并返回由 rs RandomStartPointSet 对象和 problem 描述的点。
rs
problem
RandomStartPointSet
全部折叠
创建一个具有 64 个三维点的 CustomStartPointSet 对象。
[x,y,z] = meshgrid(1:4); ptmatrix = [x(:),y(:),z(:)] + [10,20,30]; tpoints = CustomStartPointSet(ptmatrix);
tpoints 是 ptmatrix 对象中包含的 CustomStartPointSet 矩阵。
ptmatrix
使用 tpoints 从 list 对象中提取原始矩阵。
list
tpts = list(tpoints);
检查 tpts 输出是否与 ptmatrix 相同。
tpts
isequal(ptmatrix,tpts)
ans = logical 1
创建一个 40 分的 RandomStartPointSet 对象。
rs = RandomStartPointSet(NumStartPoints=40);
创建一个具有 3-D 变量、下界为 0、上界为 [10,20,30] 的问题。
[10,20,30]
problem = createOptimProblem("fmincon",x0=rand(3,1),lb=zeros(3,1),ub=[10,20,30]);
生成一组与问题一致的随机点,共 40 个。
points = list(rs,problem);
检查最大和最小生成的分量。
largest = max(max(points))
largest = 29.8840
smallest = min(min(points))
smallest = 0.1390
起点,指定为 CustomStartPointSet 对象。list 将点提取到一个矩阵中,其中每行是一个起点。
示例: tpoints = CustomStartPointSet([1:5;4:8].^2)
tpoints = CustomStartPointSet([1:5;4:8].^2)
起点描述,指定为 RandomStartPointSet 对象。list 使用 NumStartPoints 的 ArtificialBound(点数)和 rs(人工边界)属性生成起点。list 使用 x0 中的 problem 字段来确定起点中的变量数。list 使用 problem 中的边界,如下所示:
NumStartPoints
ArtificialBound
x0
list 在边界内均匀生成点。
如果分量没有边界,则 list 使用 -ArtificialBound 的下界和 ArtificialBound 的上界。
-ArtificialBound
如果某个分量有下界 lb 但没有上界,则 list 使用上界 lb + 2*ArtificialBound。
lb
lb + 2*ArtificialBound
类似地,如果一个分量有上界 ub 但没有下界,则 list 使用下界 ub - 2*ArtificialBound。
ub
ub - 2*ArtificialBound
问题描述,指定为问题结构体。使用 createOptimProblem 创建问题结构体。list 仅使用 problem 中的下界和上界(如 rs 中所述),并使用 x0 中的 problem 字段来确定变量的数量。
createOptimProblem
数据类型: struct
struct
k
n
起点,以 k×n 矩阵的形式返回。矩阵的每一行代表一个起点。
如果列出 CustomStartPointSet,那么 k 就是 NumStartPoints 属性,而 n 就是 StartPointsDimension 属性。
StartPointsDimension
如果列出 RandomStartPointSet,那么 k 就是 NumStartPoints 属性,而 n 则是从 x0 结构体的 problem 字段推断出来的。
在 R2010a 中推出
CustomStartPointSet | RandomStartPointSet | MultiStart
MultiStart
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 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处