⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vertices.m

📁 一个matlab的将军模型
💻 M
字号:
function v = vertices(a)

% Vertices class constructor 
%
% Syntax:
%   "vtcs = vertices(a)"
%
%   "vtcs = vertices(V)"
%
%   "vtcs = vertices"
%
% Description:
%   "vertices(a)" returns a vertices object constructed from the points
%   in "a" where each column of the matrix "a" contains the coordinates
%   of one vertex point.  If "V" is a vertices object, then "vertices(V)"
%   returns another vertices object using the points from "V".  A call to
%   "vertices" with no arguments returns an empty vertices object. 
%
% Examples:
%   The command sequence 
%
%   "a = ["
%
%   "2 2 4 4"
%
%   "1 3 3 1"
%
%   "0 0 0 0];"
%
%   "vtcs = vertices(a);"
%
%
%
%   constructs the vertices object "vtcs" representing a square in the
%   plane x3=0 with corners at (x1,x2) pairs (2,1), (2,3), (4,3), and (4,1). 
%
% See Also:
%   find_index

if nargin == 0
  v.list = [];
  v = class(v,'vertices');
elseif isa(a,'vertices')
  v = a;
elseif isa(a,'double')
  v.list = a;
  v = class(v,'vertices');
else
  fprintf(1,'vertices constructor: invalid argument given\n')
  v.list = [];
  v = class(v,'vertices');
end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -