[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #53924] ismember error with mixed numeric and
From: |
Guillaume |
Subject: |
[Octave-bug-tracker] [bug #53924] ismember error with mixed numeric and char arrays inputs |
Date: |
Wed, 16 May 2018 07:03:44 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 |
URL:
<http://savannah.gnu.org/bugs/?53924>
Summary: ismember error with mixed numeric and char arrays
inputs
Project: GNU Octave
Submitted by: gyom
Submitted on: Wed 16 May 2018 11:03:42 AM UTC
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Matlab Compatibility
Status: None
Assigned to: None
Originator Name: Guillaume
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: Any
_______________________________________________________
Details:
Unusual corner case with ismember() but it highlights a difference between
Octave and Matlab.
In Octave:
octave> ismember([],'a')
error: Invalid call to lookup. Correct usage is:
-- IDX = lookup (TABLE, Y)
-- IDX = lookup (TABLE, Y, OPT)
error: called from
print_usage at line 91 column 5
ismember at line 136 column 10
In Matlab:
>> ismember([],'a')
ans =
0x0 empty logical array
Testing further, one also gets in Octave:
octave> ismember([],{'a'})
ans = [](0x0)
while Matlab gives an error:
>> ismember([],{'a'})
Error using cell/ismember (line 34)
Input A of class double and input B of class cell must be cell arrays of
character vectors, unless one is a
character vector.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?53924>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #53924] ismember error with mixed numeric and char arrays inputs,
Guillaume <=