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

📄 vertcat.m

📁 几个关于多小波的程序
💻 M
字号:
function P = vertcat(varargin)

% VERTCAT -- vertical concatenation of matrix polynomials
%
%        P = vertcat(P1,P2,P3,...)
%        P = [P1;P2;P3,...]
%
% This function is not meant to be called directly by the user. It is
% invoked by Matlab if an expression of the form [P1;P2;...] is
% encountered. 
%
% The effect is to vertically concatenate the coefficient matrices.
%
% Example:
%                 3                  2
% If  P1 = 2 z - z  and  P2 = z + 3 z , then
%
%                                   2           3
%        [P1;P2] = [2;1] z + [0;3] z  + [-1;0] z

% Copyright (c) 2004 by Fritz Keinert (keinert@iastate.edu),
% Dept. of Mathematics, Iowa State University, Ames, IA 50011.
% This software may be freely used and distributed for non-commercial
% purposes, provided this copyright statement is preserved, and
% appropriate credit for its use is given.
%
% Last update: Feb 20, 2004

% convert everything to matrix polynomials

for i = 1:nargin
    if ~isa(varargin{i},'mpoly')
	varargin{i} = mpoly(varargin{i});
    end
end

if (nargin == 1)
    P = varargin{1};
    return
end

% check that all second dimensions agree,
% and determine highest and lowest exponents

n2 = size(varargin{1}.coef,2);
Pmin = varargin{1}.min;
Pmax = get(varargin{1},'max');
for i = 2:nargin
    if (size(varargin{i}.coef,2) ~= n2)
	error('sizes are not compatible');
    end
    Pmin = min(Pmin,varargin{i}.min);
    Pmax = max(Pmax,get(varargin{i},'max'));
end

% trim all matrix polynomials to the same limits

for i = 1:nargin
    varargin{i} = trim(varargin{i},[Pmin,Pmax]);
end

% concatenate vertically

P = varargin{1};
for i = 2:nargin
    P.coef = cat(1,P.coef,varargin{i}.coef);
end
P = trim(P);
[type,m,r] = match_type(varargin{:});
P = set(P,'type',type,'m',m,'r',r);

⌨️ 快捷键说明

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