📄 fperron.m
字号:
function [v,l,r] = fperron(w,f)
%FPERRON Perron-Frobenius eigenvalues
% and left and right Perron-Frobenius eigenvectors.
%
% [V,L,R] = FPERRON(W,F)
% V = FPERRON(W,F)
%
% where V contains the P-F eigenvalues of abs(F), L the left P-F
% eigenvectors, and R the right P-F eigenvectors. F is an MVFR
% matrix, and W the associated frequency vector. Each row
% in L or R is an eigenvector. V,L and R each have as many rows
% as there are frequencies in W.
% P. Phaal, November 1987. Modified by J.M.Maciejowski, 1 Dec 87
% and 10 Dec 1987.
% Copyright (c) 1987 by GEC Engineering Research Centre & Cambridge Control Ltd
nargs = nargin;
nout = nargout;
error(nargchk(2,4,nargs));
[m,n]=fsize(w,f);
if m~=n,
error('System is not square. (FPERRON)')
end
x = abs(f);
if nout == 1
v = fmax(w,feig(w,x));
else
v = []; l = []; r = [];
nf = length(w);
[rt,vt] = feig(w,x);
for i = 1:nf
[e,index] = sort(diag(fgetf(w,vt,i)));
v = [v;e(m)];
rti = fgetf(w,rt,i);
r = [r; rti(:,index(m)).'];
lti = real(inv(rti)); % This should be real.(JMM)
l = [l;lti(index(m),:)];
end
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -