[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #57030] findobj does not work with a cell arra
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #57030] findobj does not work with a cell array property value |
Date: |
Thu, 10 Oct 2019 10:36:38 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36 |
URL:
<https://savannah.gnu.org/bugs/?57030>
Summary: findobj does not work with a cell array property
value
Project: GNU Octave
Submitted by: None
Submitted on: Thu 10 Oct 2019 02:36:34 PM UTC
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Unexpected Error
Status: None
Assigned to: None
Originator Name: Martin Veenstra
Originator Email: address@hidden
Open/Closed: Open
Discussion Lock: Any
Release: 5.1.0
Operating System: Any
_______________________________________________________
Details:
>> findobj('UserData',{1,2,3})
error: invalid conversion from cell array to logical value
error: called from
findobj at line 252 column 15
One parenthesis is wrongly placed on this line.
wrong:
elseif (isnumeric (pvalue{np} && isnumeric (p.(pname{np}))))
correct:
elseif (isnumeric (pvalue{np}) && isnumeric (p.(pname{np})))
The function works with this correction for cell array property value.
However, it doesn't work anymore with empty numeric array property value.
>> findobj('UserData',[])
error: findobj: =: nonconformant arguments (op1 is 1x1, op2 is 0x0)
error: called from
findobj at line 253 column 30
Lines 252 and 253 are superflue.
wrong:
elseif (isnumeric (pvalue{np}) && isnumeric (p.(pname{np})))
match(nh,np) = (pvalue{np} == p.(pname{np}));
correct:
##elseif (isnumeric (pvalue{np}) && isnumeric (p.(pname{np})))
## match(nh,np) = (pvalue{np} == p.(pname{np}));
The function works with this correction for property values that are
empty/scalar/vector/matrix numeric arrays and cell arrays.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?57030>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #57030] findobj does not work with a cell array property value,
anonymous <=