##### 22.6.2.42 spqr

— Loadable Function: r = spqr (a)
— Loadable Function: r = spqr (a,0)
— Loadable Function: [c, r] = spqr (a,b)
— Loadable Function: [c, r] = spqr (a,b,0)

> Compute the sparse QR factorization of a, using CSparse. As the matrix Q is in general a full matrix, this function returns the Q-less factorization r of a, such that r`= chol (`a`' *` a`)`.

> If the final argument is the scalar `0` and the number of rows is larger than the number of columns, then an economy factorization is returned. That is r will have only `size (`a`,1)` rows.

> If an additional matrix b is supplied, then `spqr` returns c, where c`=` q`' *` b. This allows the least squares approximation of a`\` b to be calculated as

>               [c,r] = spqr (a,b)
>               x = r \ c

> See also: spchol, qr.