comparison toolbox/minij.m @ 0:8f23314345f4 draft

Create local repository for matrix toolboxes. Step #0 done.
author Antonio Pino Robles <data.script93@gmail.com>
date Wed, 06 May 2015 14:56:53 +0200
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:8f23314345f4
1 function A = minij(n)
2 %MINIJ Symmetric positive definite matrix MIN(i,j).
3 % A = MINIJ(N) is the N-by-N symmetric positive definite matrix with
4 % A(i,j) = MIN(i,j).
5 % Properties, variations:
6 % A has eigenvalues .25*sec^2(r*PI/(2*N+1)), r=1:N, and the eigenvectors
7 % are also known explicitly.
8 % INV(A) is tridiagonal: it is minus the second difference matrix
9 % except its (N,N) element is 1.
10 % 2*A-ONES(N) (Givens' matrix) has tridiagonal inverse and
11 % eigenvalues .5*sec^2((2r-1)PI/4N), r=1:N.
12 % (N+1)*ONES(N)-A also has a tridiagonal inverse.
13 % FLIPUD(TRIW(N,1)) is a square root of A.
14
15 % References:
16 % J. Fortiana and C. M. Cuadras, A family of matrices, the discretized
17 % Brownian bridge, and distance-based regression, Linear Algebra
18 % Appl., 264 (1997), 173-188. (For the eigensystem of A.)
19 % J. Todd, Basic Numerical Mathematics, Vol. 2: Numerical Algebra,
20 % Birkhauser, Basel, and Academic Press, New York, 1977, p. 158.
21 % D.E. Rutherford, Some continuant determinants arising in physics and
22 % chemistry---II, Proc. Royal Soc. Edin., 63, A (1952), pp. 232-241.
23 % (For the eigenvalues of Givens' matrix.)
24
25 A = min( ones(n,1)*(1:n), (1:n)'*ones(1,n) );