chol_SE.m: fix logical condition and assure symmetry instead of erroring out
Compare changes
+ 6
− 4
@@ -70,8 +70,10 @@ function [R,indef, E, P]=chol_SE(A,pivoting)
@@ -70,8 +70,10 @@ function [R,indef, E, P]=chol_SE(A,pivoting)
@@ -93,7 +95,7 @@ E=zeros(n,1);
@@ -93,7 +95,7 @@ E=zeros(n,1);
% Find the maximum magnitude of the diagonal elements. If any diagonal element is negative, then phase1 is false.
@@ -120,7 +122,7 @@ for j = 1:n-1
@@ -120,7 +122,7 @@ for j = 1:n-1
@@ -190,7 +192,7 @@ for j = 1:n-1
@@ -190,7 +192,7 @@ for j = 1:n-1