bugGNU Octave - Bugs: bug #55394, function find returns out of bound...

 
 

bug #55394: function find returns out of bound 2 (note: variable 'find' shadows function)

Submitter:  None
Submitted:  Fri 04 Jan 2019 11:34:33 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Invalid / Not an Octave Bug Assigned to:  None
Originator Name:  Massimiliano Rossi Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 4.4.0
Operating System:  * Mac OS Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 05 Jan 2019 01:13:27 AM UTC, comment #1: 

Note the warning message.  You have a variable called find which is being used instead of the function of the same name (shadow).  You need to clear that variable (probably rename it) before find can work again.  Sample code below.


find = [1, 2];  # declare variable which shadows find()
A=[1,1,2,2];
idx=find(A == 2)
clear find
idx=find(A == 2)

 

Rik <rik5>
Group administrator
Fri 04 Jan 2019 11:34:33 PM UTC, original submission:  

I have observed this with release 4.4 under Mac OS X 10.13.2

A=[1,1,2,2];
idx=find(A == 2)
error: find(4): out of bound 2 (note: variable 'find' shadows function)

on Windows 10 returns "3 4" as expected.

Anonymous

 

(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 None (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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-01-05 rik5 StatusNone Invalid / Not an Octave Bug
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code