File:  [Research Unix] / researchv10dc / cmd / matlab / demo
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:33 2018 UTC (8 years, 3 months ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Dan Cross

//Eigenvalue sensitivity example. See section 8 of the Users' Guide.
B = <3 0 7; 0 2 0; 0 0 1>
L = <1 0 0; 2 1 0; -3 4 1>,  M = L\L'
A = M*B/M
A = round(A)
<X,D> = eig(A)
long,  diag(D),  short
cond(X)
X = X/diag(X(3,:)),  cond(X)
Y = inv(X'),  Y'*A*X
for j = 1:3, c(j) = norm(Y(:,j))*norm(X(:,j));
C
E = -1.e-6*Y(:,1)*X(:,1)'
eig(A + .4*E),  eig(A + .5*E)
r = .4;  s = .5;
while s-r > 1.e-14, t = (r+s)/2; d = eig(A+t*E); ...
  if imag(d(1))=0, r = t; else, s = t;
long,  t = r
A+t*e,  eig(A+t*E)
<X,D> = eig(A+t*E);  X = X/diag(X(3,:))
short,  cond(X)

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.