spaugment
Form a sparse augmented least squares matrix.
📝Syntax
S = spaugment(A)
S = spaugment(A, c)
📥Input Arguments
Parameter Description
A non-empty numeric or logical 2-D matrix, sparse or full.
c residual scaling factor. The first element is used. Default is max(max(abs(A))) / 1000.
📤Output Arguments
Parameter Description
S sparse augmented matrix.
📄Description

spaugment forms the sparse matrix [c * I, A; A', 0].

This matrix is useful when rewriting sparse least squares problems as symmetric indefinite systems.

Double, single, logical, complex double, and complex single inputs are supported. The output is sparse, and sparse single numeric inputs keep class single.

Stored zero values in sparse A are ignored by the sparse arithmetic used to form the augmented matrix.

💡Examples
A = sparse([1 0; 2 3; 0 4]);
S = spaugment(A, 2)
A = sparse(single([1 + 2i 0; 0 3]));
S = spaugment(A, single(2))
🔗See Also
sparsespeyelsqr
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub