bugGNU Octave - Bugs: bug #54872, Function any() not working as...

 
 

bug #54872: Function any() not working as intended?

Submitter:  None
Submitted:  Sun 21 Oct 2018 10:00:46 AM UTC
   
 
Category:  Octave Function Severity:  2 - Minor
Priority:  3 - Low Item Group:  Other
Status:  Invalid / Not an Octave Bug Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 4.4.1
Operating System:  * Microsoft Windows Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 21 Oct 2018 06:47:12 PM UTC, comment #4: 

No problem ;-)

Kai Torben Ohlhus <siko1056>
Group Member
Sun 21 Oct 2018 02:11:27 PM UTC, comment #3: 

@Kai

Yeah closing Octave did the trick. I can't reproduce the problem myself either after I restarted Octave... I don't know how I even got any() to not work.

Thread closed I guess :/

that_anon <that_anon>
Sun 21 Oct 2018 11:17:53 AM UTC, comment #2: 

I cannot reproduce your problem using Octave 4.4.1 on MS Windows.  Entering:


A = [1 1 0; 0 0 0; 1 1 0];
any (A)
any (A,2)
B = [1 0 0];
any (B)


Results in:


>> any (A)

ans =

  1  1  0

>> any (A,2)

ans =

  1
  0
  1

>> any (B)

ans = 1


Maybe you restart your session and make sure, that in your script you do not accidentally overwrite "any" by another function or variable.

Kai Torben Ohlhus <siko1056>
Group Member
Sun 21 Oct 2018 11:13:52 AM UTC, comment #1: 

It works for me on Ubuntu.
Show us an example where it is wrong.

Doug Stewart <dastew>
Sun 21 Oct 2018 10:00:46 AM UTC, original submission:  

I don't think the functions does what is intended. Is function any() supposed to return a vector of 4 numbers when a 3*3 matrix is fed into it?

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #45252:  Any WTF.PNG added by None (32KiB - image/png)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by that_anon (Posted a comment)
  • -email is unavailable- added by siko1056 (Posted a comment)
  • -email is unavailable- added by dastew (Posted a comment)
  •  

    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 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-10-21 siko1056 Item GroupIncorrect Result Other
        StatusWorks For Me Invalid / Not an Octave Bug
        Open/ClosedOpen Closed
    2018-10-21 siko1056 Severity3 - Normal 2 - Minor
        Priority5 - Normal 3 - Low
        Item GroupWTF, Matlab?!? Incorrect Result
        StatusNone Works For Me
    2018-10-21 None Attached File- Added Any WTF.PNG, #45252

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code