annotate toolbox/lotkin.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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
8f23314345f4 Create local repository for matrix toolboxes. Step #0 done.
Antonio Pino Robles <data.script93@gmail.com>
parents:
diff changeset
1 function A = lotkin(n)
8f23314345f4 Create local repository for matrix toolboxes. Step #0 done.
Antonio Pino Robles <data.script93@gmail.com>
parents:
diff changeset
2 %LOTKIN Lotkin matrix.
8f23314345f4 Create local repository for matrix toolboxes. Step #0 done.
Antonio Pino Robles <data.script93@gmail.com>
parents:
diff changeset
3 % A = LOTKIN(N) is the Hilbert matrix with its first row altered to
8f23314345f4 Create local repository for matrix toolboxes. Step #0 done.
Antonio Pino Robles <data.script93@gmail.com>
parents:
diff changeset
4 % all ones. A is unsymmetric, ill-conditioned, and has many negative
8f23314345f4 Create local repository for matrix toolboxes. Step #0 done.
Antonio Pino Robles <data.script93@gmail.com>
parents:
diff changeset
5 % eigenvalues of small magnitude.
8f23314345f4 Create local repository for matrix toolboxes. Step #0 done.
Antonio Pino Robles <data.script93@gmail.com>
parents:
diff changeset
6 % The inverse has integer entries and is known explicitly.
8f23314345f4 Create local repository for matrix toolboxes. Step #0 done.
Antonio Pino Robles <data.script93@gmail.com>
parents:
diff changeset
7
8f23314345f4 Create local repository for matrix toolboxes. Step #0 done.
Antonio Pino Robles <data.script93@gmail.com>
parents:
diff changeset
8 % Reference:
8f23314345f4 Create local repository for matrix toolboxes. Step #0 done.
Antonio Pino Robles <data.script93@gmail.com>
parents:
diff changeset
9 % M. Lotkin, A set of test matrices, MTAC, 9 (1955), pp. 153-161.
8f23314345f4 Create local repository for matrix toolboxes. Step #0 done.
Antonio Pino Robles <data.script93@gmail.com>
parents:
diff changeset
10
8f23314345f4 Create local repository for matrix toolboxes. Step #0 done.
Antonio Pino Robles <data.script93@gmail.com>
parents:
diff changeset
11 A = hilb(n);
8f23314345f4 Create local repository for matrix toolboxes. Step #0 done.
Antonio Pino Robles <data.script93@gmail.com>
parents:
diff changeset
12 A(1,:) = ones(1,n);