fcnmat.m

来自「包含大量遗传算法程序」· M 代码 · 共 46 行

M
46
字号
function [d,csigma]=fcnmat(w,f)

%FCNMAT	Calculates the normalized column dominance scalings.

%	FCNMAT(W,F) returns an MVFR matrix of real positive diagonal

%	post-multiplier matrices which scale Fm so that the column

%	diagonal dominances of Dm*Fm are normalize to the same value.

%	Fm and Dm are the component matrices of F and D respectively.

%	W is the associated frequency vector.

%

%	[D,Csigma]=FCNMAT(W,F) also returns the normalized column

%	sigmas in the column vector Csigma.

%

%	To check the column dominance use

%	  plotdb(w,fcdom(w,fmulf(w,d,f)))

%	The stability similarity transformation is    Dm * Fm * Dm^(-1)

%	  fmulf(w,fmulf(w,d,f),finv(w,d))

%

%	See also FRNMAT,FRDOM,FCDOM



%	Dr M.P. Ford 22nd August 1987

% Copyright (c) 1987 by GEC Engineering Research Centre & Cambridge Control Ltd

%       MRN0019



[m,n]=fsize(w,f);

if m~=n

   error('System is not square')

end

f=abs(f);

lw=length(w);

k=1:m;

d=[];

csigma=[];

for i=0:lw-1

  fm=f(k+m*i,:);  % break up f into matrices

  fd=diag(fm);

  fm=fm-diag(fd);       %  make the diagonals zero

  fd=diag(fd.^(-1));    % make 1/diagonal

  [di,v]=eig(fd*(fm'));

  [sigma,i]=max(max(v));     % max eigenvalue

  if (sigma<=0) | any(di(:,i)<=0)

      error('System is not Irreducible')

  end

  d=[d;diag(di(:,i))];

  csigma=[csigma;sigma];

end



⌨️ 快捷键说明

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