bugGNU Octave - Bugs: bug #60347, Wrong third output in...


bug #60347: Wrong third output in "intersect" with "stable" flag

Submitter:  Rafael Vazquez <rafavzqz>
Submitted:  Tue 06 Apr 2021 08:15:21 AM UTC
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 6.2.0 Operating System:  * Any
Fixed Release:  9.1.0 Planned Release:  9.1.0
* Mandatory Fields

Add a New Comment Rich Markup

Fri 12 Jan 2024 09:50:11 PM UTC, comment #5: 

Verified.  Marking as Fixed and closing report.

Rik <rik5>
Group administrator
Sun 08 Oct 2023 10:15:30 AM UTC, comment #4: 

Thank you very much for your contribution.

I pushed the patch with very minor changes to the stable branch:

It should be part of 8.4.0 if there is another release before Octave 9.

Marking as ready for test.

Markus M├╝tzel <mmuetzel>
Group administrator
Thu 05 Oct 2023 06:45:26 PM UTC, comment #3: 

The problem persists in Octave 8.3. Attached is a patch proposal.

(file #55205)

Johannes Pfeifer <jpfeifer>
Fri 24 Feb 2023 01:12:44 AM UTC, comment #2: 

Problem persists in release 7.3.0

Lloyd Koenig <klw>
Tue 06 Apr 2021 09:24:22 PM UTC, comment #1: 

Confirmed.  There's a bunch of conditional code in intersect.m to handle the "stable" flag so it is easy to see how something like this could creep in.

Rik <rik5>
Group administrator
Tue 06 Apr 2021 08:15:21 AM UTC, original submission:  

The third output in "intersect" with the "stable" flag is not correct. For instance, the output of the following command

[~,~,IB] = intersect ([8 4 2 6], [1 7 2 8], 'stable')
IB =


should be

IB =


A similar issue appeared before for the "unique" function. See bug #46856

Rafael Vazquez <rafavzqz>


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

Attach Files:

Attached Files
file #55205:  32372.patch added by jpfeifer (2KiB - application/octet-stream)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by jpfeifer (Updated the item)
  • -email is unavailable- added by klw (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by rafavzqz (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.


    Follow 10 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-01-12 rik5 StatusReady For Test Fixed
        Open/ClosedOpen Closed
        Fixed Release8.4.0 9.1.0
        Planned Release8.4.0 9.1.0
    2023-10-08 mmuetzel StatusConfirmed Ready For Test
        Operating SystemGNU/Linux Any
        Fixed ReleaseNone 8.4.0
        Planned ReleaseNone 8.4.0
    2023-10-05 jpfeifer Attached File- Added 32372.patch, #55205
    2021-04-06 rik5 StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-b921.
    Corresponding source code