📄 poly_param.m
字号:
function val = poly_param(param)
% Retrieve general polyhedron parameters
%
% Syntax:
% "val = poly_param(param)"
%
% Description:
% "poly_param(param) returns the value of the parameter specified by
% the string "param". If "param" is not a valid polyhedron parameter,
% an error is returned.
%
%
%
% "param" can have one of five values:
%
% *'epsilon'--tolerance used in feasibility check
%
% *'bigM'--big M used to check constraint's redundancy
%
% *'hyperplane_tol'--tolerance used in hyperplane comparison
%
% *'point_tol' tolerance used in point comparison (distance based)
%
% *'vector_tol' tolerance used in vector comparison (direction based)
%
% See Also:
% linearcon,piha,vertices
p = parameters(1);
epsilon = p.poly_epsilon;
bigM = p.poly_bigM;
point_tol = p.poly_point_tol;
vector_tol = p.poly_vector_tol;
bloat_tol = p.poly_bloat_tol;
hyperplane_tol = p.poly_hyperplane_tol;
hull_flag = p.hull_flag;
svd_tol = p.poly_svd_tol;
switch (param)
case 'epsilon',
val = epsilon;
case 'bigM',
val = bigM;
case 'hyperplane_tol',
val = hyperplane_tol;
case 'point_tol',
val = point_tol;
case 'vector_tol',
val = vector_tol;
case 'bloat_tol',
val = bloat_tol;
case 'hull_flag',
val = hull_flag;
case 'svd_tol',
val = svd_tol;
otherwise,
fprintf('\007:invalid parameter name given\n')
val = [];
end
return
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -