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

📄 horzcat.m

📁 一个matlab的将军模型
💻 M
字号:
function v = horzcat(v1,v2)

% Concatenate two vertices objects 
%
% Syntax:
%   "vtcs = horzcat(v1,v2)"
%
%   "vtcs = [v1 v2]"
%
% Description:
%   "horzcat(v1,v2)" returns a vertices object containing the points from
%   "v1" with the points from "v2" appended.  "v2" can be passed as a
%   list of points, which will first be converted to a vertices object then
%   added to "v1".
%
% 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 = [
%
%   "2 2 4 4"
%
%   "1 3 3 1"
%
%   "2 2 2 2];"
%
%   "vtcs = horzcat(v1,v2)"
%
%
%
%   results in "vcts" a vertices object representing a cube with corners
%   at (x1,x2,x3) triples (2,1,0), (2,3,0), (4,3,0), (4,1,0), (2,1,2),
%   (2,3,2), (4,3,2), and (4,1,2).
%
% See Also:
%   vertices

if ~isa(v2,'vertices')
  v2 = vertices(v2);
end

if (length(v1) > 0) & (length(v2) > 0) & (dim(v1) ~= dim(v2))
  disp('VERTICES/OR: different dimensions given')
  return
end

v = vertices;
v.list = [v1.list v2.list];

⌨️ 快捷键说明

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