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

📄 plus.m

📁 CheckMate is a MATLAB-based tool for modeling, simulating and investigating properties of hybrid dyn
💻 M
字号:
function c = plus(a,b)% Add two vertices objects %% Syntax:%   "vtcs = plus(v1,v2)"%%   "vtcs = v1 + v2"%% Description:%   "plus(v1,v2)" returns a vertices object containing the sum of "v2"%   and each point in "v1".  "v2" may be passed as a vector of%   coordinates which is then converted to a single point vertices object%   and added to each point in "v1".  If "v2" is larger than a single%   point or of a different dimension than "v1", an empty vertices%   object is returned. %% Examples:%   Given a vertices object, "v1" representing a square in the x3 = 0%   plane with corners at (x1,x2) pairs (2,1), (2,3), (4,3), and (4,1), %%%%   "v2 = [0 0 1]';"%%   "vtcs = v1 + v2"%%%%   returns "vtcs", a vertices object representing the same square in the%   x3 = 1 plane.%% See Also:%   vertices,minusif ~isa(b,'vertices')  b = vertices(b);endif (dim(a) == dim(b)) && (length(b) == 1)    b1 = b.list(:,1);    c = vertices(a + repmat(b1, 1, length(a)));elseif (dim(a) == dim(b))      lenb = length(b);    lena = length(a);    c = vertices(repmat(a.list, 1, lenb) + ...                 repmat(b.list, 1, lena));end

⌨️ 快捷键说明

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