diff --git a/Modelica/Electrical/Polyphase/Basic/MutualInductor.mo b/Modelica/Electrical/Polyphase/Basic/MutualInductor.mo index b4a4ecb65d..c2b1c6a239 100644 --- a/Modelica/Electrical/Polyphase/Basic/MutualInductor.mo +++ b/Modelica/Electrical/Polyphase/Basic/MutualInductor.mo @@ -4,7 +4,7 @@ model MutualInductor "Linear mutual inductor" parameter Real epsilon=1e-9 "Relative accuracy tolerance of matrix symmetry"; parameter SI.Inductance L[m, m] "Mutual inductance matrix"; initial equation - if abs(Modelica.Math.Matrices.det(L)) < epsilon then + if Modelica.Math.Matrices.rcond(L) < epsilon then Modelica.Utilities.Streams.print("Warning: mutual inductance matrix singular!"); end if; equation diff --git a/Modelica/Electrical/QuasiStatic/Polyphase/Basic/MutualInductor.mo b/Modelica/Electrical/QuasiStatic/Polyphase/Basic/MutualInductor.mo index 60f5aa27b8..47cd240a51 100644 --- a/Modelica/Electrical/QuasiStatic/Polyphase/Basic/MutualInductor.mo +++ b/Modelica/Electrical/QuasiStatic/Polyphase/Basic/MutualInductor.mo @@ -5,7 +5,7 @@ model MutualInductor "Linear mutual inductor" parameter Real epsilon=1e-9 "Relative accuracy tolerance of matrix symmetry"; parameter SI.Inductance L[m, m] "Mutual inductance matrix"; initial equation - if abs(Modelica.Math.Matrices.det(L)) < epsilon then + if Modelica.Math.Matrices.rcond(L) < epsilon then Modelica.Utilities.Streams.print("Warning: mutual inductance matrix singular!"); end if; equation diff --git a/Modelica/Math/package.mo b/Modelica/Math/package.mo index 6a875a6082..8794110767 100644 --- a/Modelica/Math/package.mo +++ b/Modelica/Math/package.mo @@ -2579,18 +2579,17 @@ result = Matrices.det(A); This function returns the determinant \"result\" of matrix A computed by a LU decomposition with row pivoting. For details about determinants, see http://en.wikipedia.org/wiki/Determinant. -Usually, this function should never be used, because +Usually, this function should not be used, because there are nearly always better numerical algorithms -as by computing the determinant. Examples: +than computing the determinant. Examples: