?? uncondirections.m
字號:
function directions = uncondirections(pollmethod,x)
%UNCONDIRECTIONS: finds search vectors when no constraints are present.
% POLLMETHOD: Poll method used to get search vectors.
%
% X: Point at which polling is done (usually the best point found so
% far).
%
% DIRECTIONS: Returns direction vectors that positively span the tangent
% cone at the current iterate, with respect to bound and linear constraints.
% Copyright 2004 The MathWorks, Inc.
% $Revision: 1.8.4.1 $ $Date: 2004/04/06 01:09:55 $
% Rakesh Kumar
vars = length(x);
Basis = eye(vars);
% Form directions that forms the positive basis
if strcmpi(pollmethod,'positivebasisnp1') %Minimal positive basis (n+1 vectors)
directions = [-1*ones(vars,1) Basis];
elseif strcmpi(pollmethod,'positivebasis2n') %Maximal positive basis (2n vectors)
directions = [Basis -Basis];
else
error('gads:UNCONDIRECTIONS:pollmethod','Invalid choice of Poll method.');
end
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -