Spline Toolbox
  Go to function:
    Search    Help Desk 
slvblk    Examples   See Also

Solve an almost block-diagonal linear system

Syntax

Description

slvblk(blokmat,b) returns the solution (if any) of the linear system Ax = b, with the matrix A stored in blokmat in the spline almost block diagonal form. At present, only the M-file spcol provides such a description, of the matrix whose typical entry is the value of some derivative (including the 0th derivative, i.e., the value) of a B-spline at some point.

If the system is overdetermined (i.e., has more equations than unknowns but is of full rank), then the least-squares solution is returned. In this case, the optional third argument, w, may be supplied to ensure that the solution minimized the weighted minimized the weighted l2

jw(j)*((A*x-b)(j))2

The right side b may contain several columns, and is expected to contain as many rows as there are rows in the matrix described by blokmat.

Examples

sp=spmak(knots,slvblk(spcol(knots,k,x,1),y.')) provides in sp the B-form of the spline s of order k with knot sequence knots that matches the given data (x,y), i.e., satisfies s(x)=y.

Algorithm

The M-file bkbrk is used to obtain the essential parts of the coefficient matrix described by blokmat (in one of two available forms).

A QR factorization is made of each diagonal block, after it was augmented by the equations not dealt with when factoring the preceding block. The resulting factorization is then used to solve the linear system by backsubstitution.

See Also

bkbrk, spcol, spapi, spap2, spcol



[ Previous | Help Desk | Next ]