What is wrong with my code ? It works well six years ago.
It is the case of a singular matrix.
I review the following exercise: Compute the LU factorization of the matrix
A=[1 2 -1 3 2;2 4 -2 5 1;-1 -2 1 -3 -4;3 6 2 10 7; 1 2 4 0 4].
The used code is:
using LinearAlgebra
A=[1 2 -1 3 2;2 4 -2 5 1;-1 -2 1 -3 -4;3 6 2 10 7; 1 2 4 0 4].
(L,U,p)=lu(A)
Error message: Error: SingularException
and
(L,U,p)=lu(A,check=false)
Error message: Failed factorization of type LU(Float64, Matrix(Float64))
When the matrix is not singular then the lu factorizarion works
without problem.