function[x]=chelosky_dejen_2018(M,b) if det(M)==0 error('algorithm is not working') end n = length( M ); L = zeros( n, n ); for i=1:n L(i, i) = sqrt( M(i, i) - L(i, :)*L(i, :)' ); for j=(i + 1):n L(j, i) = ( M(j, i) - L(i, :)*L(j, :)' )/L(i, i); end end Y=L\b; x=L'\Y; end