📄 randompoint.m
字号:
function ind = randompoint(prob, n)%RANDOMNEW to generate n new point randomly from the mop problem given.if (nargin==1) n=1;endrandarray = rand(prob.pd, n);lowend = prob.domain(:,1);span = prob.domain(:,2)-lowend;point = randarray.*(span(:,ones(1, n)))+ lowend(:,ones(1,n));cellpoints = num2cell(point, 1);indiv = struct('parameter',[],'objective',[], 'estimation', []);ind = repmat(indiv, 1, n);[ind.parameter] = cellpoints{:};% estimation = struct('obj', NaN ,'std', NaN);% [ind.estimation] = deal(repmat(estimation, prob.od, 1));end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -