2 ## @deftypefn {Function File} {@var{a}} = lauchli (@var{n})
3 ## @deftypefnx {Function File} {@var{a}} = lauchli (@var{n},@var{mu})
4 ## Creates the matrix [ ones(1,@var{n}); @var{mu}*eye(@var{n}) ]
5 ## The value @var{mu} defaults to sqrt(eps).
6 ## This is an ill-conditioned system for testing the
7 ## accuracy of the QR routine.
14 ## norm(Q'*Q - eye(rows(Q)))
18 ## @seealso {ones,zeros,eye}
20 ## This program is in the public domain
21 ## Author: Paul Kienzle <pkienzle@users.sf.net>
23 function A = lauchli(n,mu)
24 if (nargin < 1 || nargin > 2)
25 usage("A = lauchli(n [, mu])");
28 if (nargin < 2), mu = sqrt(eps); endif
30 A = [ ones(1,n); mu*eye(n) ];