Learn R Programming

optR (version 1.2.5)

LU.decompose: LU decomposition

Description

The function decomposes matrix A into LU with L lower matrix and U as upper matrix

Usage

LU.decompose(A, tol = 1e-07)

Arguments

A
: Input Matrix
tol
: tolerance

Value

A : Transformed matrix with Upper part of the triangele is (U) and Lower part of the triangular is L (Diagnoal for the L matrix is 1)

Examples

Run this code
A<-matrix(c(0,-1,1, -1,2,-1,2,-1,0), nrow=3,ncol=3, byrow = TRUE)
Z<-optR(A, tol=1e-7, method="LU")

Run the code above in your browser using DataLab