Mercurial > matrix-functions
diff toolbox/minij.m @ 2:c124219d7bfa draft
Re-add the 1995 toolbox after noticing the statement in the ~higham/mctoolbox/ webpage.
author | Antonio Pino Robles <data.script93@gmail.com> |
---|---|
date | Thu, 07 May 2015 18:36:24 +0200 |
parents | 8f23314345f4 |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/toolbox/minij.m Thu May 07 18:36:24 2015 +0200 @@ -0,0 +1,25 @@ +function A = minij(n) +%MINIJ Symmetric positive definite matrix MIN(i,j). +% A = MINIJ(N) is the N-by-N symmetric positive definite matrix with +% A(i,j) = MIN(i,j). +% Properties, variations: +% A has eigenvalues .25*sec^2(r*PI/(2*N+1)), r=1:N, and the eigenvectors +% are also known explicitly. +% INV(A) is tridiagonal: it is minus the second difference matrix +% except its (N,N) element is 1. +% 2*A-ONES(N) (Givens' matrix) has tridiagonal inverse and +% eigenvalues .5*sec^2((2r-1)PI/4N), r=1:N. +% (N+1)*ONES(N)-A also has a tridiagonal inverse. +% FLIPUD(TRIW(N,1)) is a square root of A. + +% References: +% J. Fortiana and C. M. Cuadras, A family of matrices, the discretized +% Brownian bridge, and distance-based regression, Linear Algebra +% Appl., 264 (1997), 173-188. (For the eigensystem of A.) +% J. Todd, Basic Numerical Mathematics, Vol. 2: Numerical Algebra, +% Birkhauser, Basel, and Academic Press, New York, 1977, p. 158. +% D.E. Rutherford, Some continuant determinants arising in physics and +% chemistry---II, Proc. Royal Soc. Edin., 63, A (1952), pp. 232-241. +% (For the eigenvalues of Givens' matrix.) + +A = min( ones(n,1)*(1:n), (1:n)'*ones(1,n) );