home *** CD-ROM | disk | FTP | other *** search
/ APDL Eductation Resources / APDL Eductation Resources.iso / programs / electronic / rlab / TestMatrix / dingdong_r < prev    next >
Encoding:
Text File  |  1994-12-20  |  925 b   |  34 lines

  1. //-------------------------------------------------------------------//
  2.  
  3. // Synopsis:    Dingdong matrix - a symmetric Hankel matrix.
  4.  
  5. // Syntax:    A = dingdong ( N ) 
  6.  
  7. // Descriptioin:
  8.  
  9. //    A is the symmetric N-by-N Hankel matrix with 
  10. //    A[i;j] = 0.5/(N-i-j+1.5).
  11.  
  12. //    The eigenvalues of A cluster around PI/2 and -PI/2.
  13.  
  14. //      Invented by F.N. Ris.
  15.  
  16. //          Reference:
  17. //          J.C. Nash, Compact Numerical Methods for Computers: Linear
  18. //          Algebra and Function Minimisation, second edition, Adam Hilger,
  19. //          Bristol, 1990 (Appendix 1).
  20.  
  21. //    This file is a translation of dingdong.m from version 2.0 of
  22. //    "The Test Matrix Toolbox for Matlab", described in Numerical
  23. //    Analysis Report No. 237, December 1993, by N. J. Higham.
  24.  
  25. // Dependencies
  26.    require cauchy
  27.  
  28. //-------------------------------------------------------------------//
  29.  
  30. dingdong = function ( n )
  31. {
  32.   return cauchy (-2*(1:n) + (n+1.5));
  33. };
  34.