home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l460 / 2.ddi / SPECMAT.DI$ / GALLERY.M < prev    next >
Encoding:
Text File  |  1993-03-07  |  723 b   |  27 lines

  1. function A = gallery(n)
  2. %GALLERY A couple of small test matrices.
  3. %    GALLERY(3) is a badly conditioned 3-by-3 matrix.
  4. %    GALLERY(5) is an interesting eigenvalue problem.  Try to find
  5. %    its EXACT eigenvalues and eigenvectors.
  6. %
  7. %    See also MAGIC, HILB, INVHILB, HADAMARD, ROSSER, WILKINSON.
  8.  
  9. %    C. Moler, 4-30-87.
  10. %    Copyright (c) 1984-93 by The MathWorks, Inc.
  11.  
  12. if n == 3
  13.    A = [ -149   -50  -154
  14.           537   180   546
  15.           -27    -9   -25 ];
  16.  
  17. elseif n == 5
  18.    A = [  -9     11    -21     63    -252
  19.           70    -69    141   -421    1684
  20.         -575    575  -1149   3451  -13801
  21.         3891  -3891   7782 -23345   93365
  22.         1024  -1024   2048  -6144   24572 ];
  23.  
  24. else
  25.    A = [];
  26. end
  27.