bugGNU Octave - Bugs: bug #53924, ismember error with mixed numeric...

 
 

bug #53924: ismember error with mixed numeric and char arrays inputs

Submitted by:  Guillaume <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:  Fixed Assigned to:  None
Originator Name:  Guillaume Open/Closed:  Closed
Release:  dev Operating System:  Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 14 Dec 2018 05:03:45 PM UTC, comment #4:

I checked in the patch from comment #1 under your name here https://hg.savannah.gnu.org/hgweb/octave/rev/00924e6e513e.

Marking as fixed and closing report.

Rik <rik5>
Project Administrator
Fri 14 Dec 2018 09:50:58 AM UTC, comment #3:

Matlab does this:

Guillaume <gyom>
Fri 14 Dec 2018 01:26:41 AM UTC, comment #2:

@Guillaume: does Matlab always promote to numeric? Or does it depend on whether the input is the first or the second?

What does Matlab return for

Rik <rik5>
Project Administrator
Fri 18 May 2018 11:48:42 AM UTC, comment #1:

It seems that when one input is numeric and the other is a char array, Matlab converts the latter into numeric so I suggest the following fix:

Guillaume <gyom>
Wed 16 May 2018 11:03:42 AM UTC, original submission:

Unusual corner case with ismember() but it highlights a difference between Octave and Matlab.

In Octave:

In Matlab:

Testing further, one also gets in Octave:

while Matlab gives an error:

Guillaume <gyom>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by gyom (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-12-14 rik5 StatusPatch Submitted => Fixed
        Open/ClosedOpen => Closed
    2018-12-14 rik5 StatusNone => Patch Submitted

    Back to the top


    Powered by Savane 3.4