triangularup {TUGLab} | R Documentation |
Square upper triangulation
Description
This function computes a square upper triangular version of the given matrix.
Usage
triangularup(V, tol = 100 * .Machine$double.eps)
Arguments
V |
A matrix. |
tol |
A tolerance parameter, as a non-negative number. |
Value
A square upper triangular version of the given matrix.
This function returns two outputs:
SUT
, the square upper triangular matrix.
pivot
, a vector indicating pivot rows.
Examples
set.seed(58)
triangularup(matrix(sample(1:10, 16, replace = TRUE), nrow = 4, ncol = 4))
triangularup(matrix(c(7,8,5,5,3,5,4,1,3,10,4,4,6,7,8,8),byrow=TRUE, nrow = 4, ncol = 4))
triangularup(matrix(c(1,2,1,1,-2,0,1,1),byrow=TRUE, nrow = 2, ncol = 4))
triangularup(matrix(c(1,2,1,-2,0,1,3,-1,1,-2,3,3),byrow=TRUE, nrow = 4, ncol = 3))
[Package TUGLab version 0.0.1 Index]