home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l455 / 7.ddi / ROBUST.DI$ / PERRON.M < prev    next >
Encoding:
Text File  |  1993-03-11  |  1.6 KB  |  61 lines

  1. function [MU] = perron(A,K)
  2. %
  3. % [MU] = PERRON(A) or
  4. % [MU] = PERRON(A,K) produces the scalar upper bound MU on the
  5. % structured singular value (ssv) computed via the Perron 
  6. % eigenvalue technique of Safonov (IEE Proc., Pt. D, Nov. '82).
  7. %
  8. % Input: 
  9. %     A  -- a pxq complex matrix whose ssv is to be computed
  10. % Optional input:
  11. %     K  -- uncertainty block sizes--default is K=ones(q,2).  K is an
  12. %           an nx1 or nx2 matrix whose rows are the uncertainty block
  13. %           sizes for which the ssv is to be evaluated; K must satisfy 
  14. %           sum(K) == [q,p].  If only the first column of K is given then the
  15. %           uncertainty blocks are taken to be square, as if K(:,2)=K(:,1).
  16. % Output:
  17. %     MU -- An upper bound on the structured singular value of A
  18.  
  19. %
  20. % R. Y. Chiang & M. G. Safonov 8/14/88
  21. % Copyright (c) 1988-89 by the MathWorks, Inc.
  22. % All Rights Reserved.
  23. % --------------------------------------------------------------------
  24. %
  25. [m,n] = size(A);
  26. if nargin == 1
  27.     K = ones(n,1);
  28. end
  29. [s,ck] = size(K);
  30. if ck == 1
  31.    K = [K K];
  32. end
  33. K1c = K(:,2);
  34. K2c = K(:,1);
  35. if sum(K1c)~= m | sum(K2c)~= n,
  36.     error('K and A are not dimensionally compatible')
  37. end
  38. %
  39. % ------ form matrix aa of max singular values of blocks of A
  40. %
  41. if s < n
  42.    aa = zeros(s,s);
  43.    xi_1 = 0;
  44.    for i = 1:s
  45.        x = sum(K1c(1:i));
  46.        yj_1 = 0;
  47.        for j = 1:s
  48.            y = sum(K2c(1:j));
  49.            aa(i,j) = max(svd(A(xi_1+1:x,yj_1+1:y)));
  50.            yj_1 = y;
  51.        end
  52.        xi_1 = x;
  53.    end
  54.    n = s;
  55. else
  56.    aa = abs(A);
  57. end
  58. %
  59. MU = max(real(eig(aa)));
  60. %
  61. % ------ End of PERRON.M --- RYC/MGS 8/14/88