bugGNU Octave - Bugs: bug #33531, ismember Matlab compatibility issue

 
 

bug #33531: ismember Matlab compatibility issue

Submitted by:  Arnaud Delorme <arnodelorme>
Submitted on:  Sat 11 Jun 2011 03:35:43 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: 3.4.0Operating System: Mac OS

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Mon 26 Sep 2011 05:11:03 AM UTC, comment #4:

Fixed in this changeset (http://hg.savannah.gnu.org/hgweb/octave/rev/e8c52b442a99). Reporter will need to build from development sources or wait until version 3.6 to see the change.

Rik <rik5>
Project Administrator
Wed 27 Jul 2011 10:57:49 PM UTC, comment #3:

This is what Matlab returns

ismember (2 < 3, int8 ([0, 1]))
ans =

1

ismember (1, int8 ([0, 1]))
ans =

1

ismember (int16 (1), int8 ([0, 1]))
ans =

1

Octave 3.4.0 return an error for the first command and returns 1 for the two other ones.

Arnaud Delorme <arnodelorme>
Wed 27 Jul 2011 02:07:48 PM UTC, comment #2:

No response to request for information in 1 month. Closing issue report. It may be re-opened.

Rik <rik5>
Project Administrator
Sun 12 Jun 2011 07:39:59 PM UTC, comment #1:

The Matlab docs don't seem to say anything about the arguments to ismember being logical, but if that is allowed, why should logical values be converted to numeric values?

What are the rules for comparison here? Does class have to match exactly, or are there some loose and undocumented conversion rules at work? For example, what happens for

?

John W. Eaton <jwe>
Project Administrator
Sat 11 Jun 2011 03:35:43 PM UTC, original submission:

ismember does not convert logical value to numerical values when necessary

ismember([0 1], [0 1]); % OK 

ismember(2 < 3, [0 1]); % crashes (Matlab OK)

Arnaud Delorme <arnodelorme>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by arnodelorme (Submitted the item)
  •  

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

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 26 Sep 2011 05:11:03 AM UTCrik5StatusNeed Info=>Fixed
      Open/ClosedOpen=>Closed
    Thu 28 Jul 2011 02:51:11 AM UTCrik5Open/ClosedClosed=>Open
    Wed 27 Jul 2011 02:07:48 PM UTCrik5Open/ClosedOpen=>Closed
    Sun 12 Jun 2011 07:48:08 PM UTCjweStatusNone=>Need Info

    Back to the top


    Powered by Savane 3.1-cleanup1