GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • » Octave core
  • » by package
  • » alphabetical

This view

  • Original page
  • New address

GeezerVison is showing octave.sourceforge.io — Function Reference: spaugment

Octave-Forge - Extra packages for GNU Octave
Home · Packages · Developers · Documentation · FAQ · Bugs · Mailing Lists · Links · Code

Navigation

Operators and Keywords

Function List:

  • » Octave core
  • » by package
  • » alphabetical

C++ API

: s = spaugment (A, c)

Create the augmented matrix of A.

This is given by

[c * eye(m, m), A;
            A', zeros(n, n)]

This is related to the least squares solution of A \ b, by

s * [ r / c; x] = [ b, zeros(n, columns(b)) ]

where r is the residual error

r = b - A * x

As the matrix s is symmetric indefinite it can be factorized with lu, and the minimum norm solution can therefore be found without the need for a qr factorization. As the residual error will be zeros (m, m) for underdetermined problems, and example can be

m = 11; n = 10; mn = max (m, n);
A = spdiags ([ones(mn,1), 10*ones(mn,1), -ones(mn,1)],
             [-1, 0, 1], m, n);
x0 = A \ ones (m,1);
s = spaugment (A);
[L, U, P, Q] = lu (s);
x1 = Q * (U \ (L \ (P  * [ones(m,1); zeros(n,1)])));
x1 = x1(end - n + 1 : end);

To find the solution of an overdetermined problem needs an estimate of the residual error r and so it is more complex to formulate a minimum norm solution using the spaugment function.

In general the left division operator is more stable and faster than using the spaugment function.

See also: mldivide.

Package: octave

SourceForge.net Logo
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.