isempty.m
来自「一个matlab的将军模型」· M 代码 · 共 53 行
M
53 行
function result = isempty(p)
% Determine if a polyhedron object is empty
%
% Syntax:
% "result = isempty(poly)"
%
% Description:
% "isempty(poly)" returns "1" if "poly" is empty and "0" otherwise.
%
% Examples:
% Given a polyhedron object, "poly" representing a square in the x3 = 0
% plane with corners at (x1,x2) pairs (2,1), (2,3), (4,3), and (4,1)
%
%
%
% "result = isempty(poly)"
%
%
%
% returns
%
%
%
% "result = 0"
%
%
%
% while
%
%
%
% "poly = polyhedron"
%
% "result = isempty(poly)"
%
%
%
% returns
%
%
%
% "result = 1"
%
%
%
% See Also:
% polyhedron
result = isempty(p.CE) & isempty(p.dE) & isempty(p.VE) & ...
isempty(p.CI) & isempty(p.dI) & isempty(p.VI) & ...
isempty(p.vtcs);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?