Mercurial > matrix-functions
annotate toolbox/lauchli.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 |
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 = lauchli(n, mu) |
8f23314345f4
Create local repository for matrix toolboxes. Step #0 done.
Antonio Pino Robles <data.script93@gmail.com>
parents:
diff
changeset
|
2 %LAUCHLI Lauchli matrix - rectangular. |
8f23314345f4
Create local repository for matrix toolboxes. Step #0 done.
Antonio Pino Robles <data.script93@gmail.com>
parents:
diff
changeset
|
3 % LAUCHLI(N, MU) is the (N+1)-by-N matrix [ONES(1,N); MU*EYE(N))]. |
8f23314345f4
Create local repository for matrix toolboxes. Step #0 done.
Antonio Pino Robles <data.script93@gmail.com>
parents:
diff
changeset
|
4 % It is a well-known example in least squares and other problems |
8f23314345f4
Create local repository for matrix toolboxes. Step #0 done.
Antonio Pino Robles <data.script93@gmail.com>
parents:
diff
changeset
|
5 % that indicates the dangers of forming A'*A. |
8f23314345f4
Create local repository for matrix toolboxes. Step #0 done.
Antonio Pino Robles <data.script93@gmail.com>
parents:
diff
changeset
|
6 % MU defaults to SQRT(EPS). |
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 % P. Lauchli, Jordan-Elimination und Ausgleichung nach |
8f23314345f4
Create local repository for matrix toolboxes. Step #0 done.
Antonio Pino Robles <data.script93@gmail.com>
parents:
diff
changeset
|
10 % kleinsten Quadraten, Numer. Math, 3 (1961), pp. 226-240. |
8f23314345f4
Create local repository for matrix toolboxes. Step #0 done.
Antonio Pino Robles <data.script93@gmail.com>
parents:
diff
changeset
|
11 |
8f23314345f4
Create local repository for matrix toolboxes. Step #0 done.
Antonio Pino Robles <data.script93@gmail.com>
parents:
diff
changeset
|
12 if nargin < 2, mu = sqrt(eps); end |
8f23314345f4
Create local repository for matrix toolboxes. Step #0 done.
Antonio Pino Robles <data.script93@gmail.com>
parents:
diff
changeset
|
13 A = [ones(1,n); |
8f23314345f4
Create local repository for matrix toolboxes. Step #0 done.
Antonio Pino Robles <data.script93@gmail.com>
parents:
diff
changeset
|
14 mu*eye(n)]; |