# HG changeset patch # User Rik # Date 1523508638 25200 # Node ID 1f1aef87e136d62898fbdbba94b0579e006848c6 # Parent 0f98040552debf360aeee29acc5d1e78439930f4 issymmetric.m: Fix calculation of skew matrices (bug in 0f98040552de). * issymmetric.m: Reshape comparison matrix into column vector before using any(). diff -r 0f98040552de -r 1f1aef87e136 scripts/linear-algebra/issymmetric.m --- a/scripts/linear-algebra/issymmetric.m Wed Apr 04 13:28:12 2018 +0200 +++ b/scripts/linear-algebra/issymmetric.m Wed Apr 11 21:50:38 2018 -0700 @@ -81,7 +81,7 @@ if (strcmp (skewopt, "nonskew")) if (tol == 0) ## check for exact symmetry - retval = ! any (A != A.'); + retval = ! any ((A != A.')(:)); else norm_x = norm (A, Inf); retval = norm_x == 0 || norm (A - A.', Inf) / norm_x <= tol; @@ -89,7 +89,7 @@ else ## skew symmetry if (tol == 0) - retval = ! any (A != -A.'); + retval = ! any ((A != -A.')(:)); else norm_x = norm (A, Inf); retval = norm_x == 0 || norm (A + A.', Inf) / norm_x <= tol;