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

📄 bloctoep.m

📁 剑桥大学用于线性和双线性动力学系统辨识的工具箱
💻 M
字号:
function y = bloctoep(C,R,N)%BLOCTOEP   Block Toeplitz matrix.%%   BLOCTOEP(C,R,N) is a block Toeplitz matrix with C as its first block%      column and R as its first block row. N is the number of block%      matrices in C and R.%%   Usage:%      Y = bloctoep(C,R,N)%%   Inputs: %      C := [C(1);C(2);...;C(N)] Block matrix, i.e. all C(i) are matrices%             with the same dimemsions.%      R := [R(1);R(2);...;R(N)] Block matrix with same dimensions as C.%             It is assumed that R(1) = C(1). %      N := Positive integer.%   %   Outputs:  %      Y := Block Toeplitz matrix, defined as%    %                  [  C(1)    R(2)    R(3)  ...   R(N)  ]%                  [  C(2)    C(1)    R(2)  ...  R(N-1) ]%                  [  C(3)    C(2)    C(1)  ...  R(N-2) ]%             Y := [   :       :       :    ...    :    ]%                  [ C(N-2)  C(N-3)  C(N-4) ...   R(3)  ]%                  [ C(N-1)  C(N-2)  C(N-3) ...   R(2)  ]%                  [  C(N)   C(N-1)  C(N-2) ...   C(1)  ]%   %   See also TOEPLITZ, HANKEL, BLOCHANK.%% CUED System Identification Toolbox.% Cambridge University Engineering Department.% Copyright (C) 1998-2002. All Rights Reserved.% Version 1.00, Date: 01/06/2002% Created by H. Chen and E.C. Kerrigan.[nrowC,ncolC] = size(C);[nrowR,ncolR] = size(R);if nrowC ~= nrowR   error('The number of rows of the input matrices are different.')endif ncolC ~= ncolR   error('The number of columns of the input matrices are different.')endif N <= 0  error('N is not a positive integer.')endif rem(nrowC,N) ~= 0   error('N does not divide into the number of rows in C.')end   if rem(nrowR,N) ~= 0   error('N does not divide into the number of rows in R.')end   if ncolC == 1   y = toeplitz(C',R');   %  SISO caseend   rows = nrowC/N;y = zeros(N*rows,N*ncolC); for i=1:N      for j=1:i,	y(((i-1)*rows+1):i*rows,((j-1)*ncolC+1):j*ncolC)=C(((i-j)*rows+1):(i-j+1)*rows,:);  end	  for j=i+1:N,	y((i-1)*rows+1:i*rows,(j-1)*ncolC+1:j*ncolC)=R((j-i)*rows+1:(j-i+1)*rows,:);  end end  % *** last line of bloctoep.m ***

⌨️ 快捷键说明

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