home *** CD-ROM | disk | FTP | other *** search
/ APDL Eductation Resources / APDL Eductation Resources.iso / programs / electronic / rlab / TestMatrix / lesp_r < prev    next >
Encoding:
Text File  |  1994-06-09  |  1.6 KB  |  45 lines

  1. //-------------------------------------------------------------------//
  2.  
  3. // Synopsis:    A tridiagonal matrix with real, sensitive eigenvalues.
  4.  
  5. // Syntax:      lesp ( N )
  6.  
  7. // Description:
  8.  
  9. //      A is an N-by-N matrix whose eigenvalues are real and smoothly
  10. //      distributed in the interval approximately [-2*N-3.5,
  11. //      -4.5]. The sensitivities of the eigenvalues increase
  12. //      exponentially as  the eigenvalues grow more negative. The
  13. //      matrix is similar to the symmetric tridiagonal matrix with the
  14. //      same diagonal entries and with off-diagonal entries 1, via a
  15. //      similarity transformation with D = diag(1!,2!,...,N!). 
  16.  
  17. //      References:
  18. //      H.W.J. Lenferink and M.N. Spijker, On the use of stability regions in
  19. //           the numerical analysis of initial value problems,
  20. //           Math. Comp., 57 (1991), pp. 221-237.
  21. //      L.N. Trefethen, Pseudospectra of matrices, in Numerical Analysis 1991,
  22. //           Proceedings of the 14th Dundee Conference,
  23. //           D.F. Griffiths and G.A. Watson, eds, Pitman Research Notes in
  24. //           Mathematics, volume 260, Longman Scientific and Technical, Essex,
  25. //           UK, 1992, pp. 234-266.
  26.  
  27. //    This file is a translation of lesp.m from version 2.0 of
  28. //    "The Test Matrix Toolbox for Matlab", described in Numerical
  29. //    Analysis Report No. 237, December 1993, by N. J. Higham.
  30.  
  31. // Dependencies
  32.    rfile tridiag
  33.  
  34. //-------------------------------------------------------------------//
  35.  
  36. lesp = function ( n )
  37. {
  38.   local (x, T)
  39.  
  40.   x = 2:n;
  41.   T = tridiag( ones(size(x))./x, -(2*[x, n+1]+1), x);
  42.  
  43.   return T;
  44. };
  45.