changeset 27482:d4ee26280bb9 stable

findobj.m: Fix typo and correctly handle numeric properties (bug #57030) * findobj.m: Fix typo which prevented non-numeric properties from being compared. Change calculation of numeric equality to work correctly including for empty matrices.
author Rik <rik@octave.org>
date Thu, 10 Oct 2019 09:10:49 -0700
parents 730af4e7034a
children 94d278b130d1 616b844e903a
files scripts/plot/util/findobj.m
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/util/findobj.m	Sun Sep 29 20:22:12 2019 -0700
+++ b/scripts/plot/util/findobj.m	Thu Oct 10 09:10:49 2019 -0700
@@ -249,8 +249,8 @@
             elseif (numel (p.(pname{np})) == numel (pvalue{np}))
               if (ischar (pvalue{np}) && ischar (p.(pname{np})))
                 match(nh,np) = strcmpi (pvalue{np}, p.(pname{np}));
-              elseif (isnumeric (pvalue{np} && isnumeric (p.(pname{np}))))
-                match(nh,np) = (pvalue{np} == p.(pname{np}));
+              elseif (isnumeric (pvalue{np}) && isnumeric (p.(pname{np})))
+                match(nh,np) = all ((pvalue{np} == p.(pname{np}))(:));
               else
                 match(nh,np) = isequal (pvalue{np}, p.(pname{np}));
               endif