LU factorization of a square DD matrix
[L,U] = lu(A)
square matrix of DD real numbers, of size [n,n].
Upper triangular square matrix of DD real numbers, of size [n,n].
square matrix of DD real numbers, of size [m,n], Lower triangular after some rows permutations.
[L,U]= lu(A)
computes the matrices L
L and
U
such that A = L*U
, with U
Upper triangular, and L
Lower triangular after some rows permutations.
The implementation for matrices of DD numbers is restricted to square matrices.
:
--> A = ddrand(4,4) A = [d1] 0.2113249 0.6653811 0.8782165 0.7263507 0.7560439 0.6283918 0.068374 0.1985144 0.0002211 0.8497452 0.5608486 0.5442573 0.3303271 0.685731 0.6623569 0.2320748 [d2] 10^-17 * 0.6832332 -4.191495 -1.7567766 -1.762794 -2.5063366 1.3547731 0.0425332 0.6182611 -0.0005011 2.2655615 1.9664026 -2.098293 -1.039939 -1.3751321 -0.5817424 -1.2407185 --> [L,U] = lu(A) U = [d1] 0.2113249 0.6653811 0.8782165 0.7263507 0. -1.7521009 -3.0735666 -2.4001053 0. 0. -0.9294872 -0.6195676 0. 0. 0. -0.3587091 [d2] 10^-17 * 0.6832332 -4.191495 -1.7567766 -1.762794 0. 9.5531966 -15.971936 -10.783318 0. 0. -0.1814096 -0.9867343 0. 0. 0. 0.3761884 L = [d1] 1. 0. 0. 0. 3.5776379 1. 0. 0. 0.0010464 -0.4845891 1. 0. 1.5631246 0.2022387 0.0955482 1. [d2] 10^-17 * 0. 0. 0. 0. 11.073338 0. 0. 0. -0.008786 1.16019 0. 0. 0.3666115 -0.8467752 -0.3476148 0. --> L*U - A ans = [d1] 10^-32 * 0. 0. 0. 0. -1.2325952 2.4651903 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.3081488 [d2] zeros(4,4)