eyef.m

来自「MFD-多变量系统频域设计工具」· M 代码 · 共 38 行

M
38
字号
function y=eyef(w,m,n)
%EYEF   Generate identity MVFR matrix
%       EYEF(W,n) returns an MVFR matrix made up of n-by-n identity matrices.
%
%       EYEF(W,m,n) returns an MVFR matrix made up of m-by-n identity
%       matrices with 1's on the diagonals and zeros elsewhere.
%
%       EYEF(W,F) returns an MVFR matrix made up of identity matrices
%       the same size as the component matrices of F.  F is an
%       MVFR matrix and W is the associated frequency vector.
%
%       W is the associated frequency vector.
%       See EYE

%       Dr M.P. Ford 4th August 1987
% Copyright (c) 1987 by GEC Engineering Research Centre & Cambridge Control Ltd

nargs=nargin;
error(nargchk(2,3,nargs));
lw=length(w);
if nargs==3
  ey=eye(m,n);
else
  if min(size(m)) == 1    % m is a scalar
     ey=eye(m);
  else          % m should be an MVFR matrix
     [m,n]=fsize(w,m);
     ey = eye(m,n);
  end
end
[ym,yn]=size(ey);
k=1:ym;
y=zeros(lw*ym,yn);
for j=1:lw
  y(k+ym*(j-1),:)=ey;
end

⌨️ 快捷键说明

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