bugGNU Octave - Bugs: bug #59642, round: accept N and TYPE arguments

 
 

bug #59642: round: accept N and TYPE arguments

Submitter:  Gazi Aliev <gazi>
Submitted:  Wed 09 Dec 2020 12:00:07 PM UTC
   
 
Category:  Octave Function Severity:  1 - Wish
Priority:  3 - Low Item Group:  Feature Request
Status:  Duplicate Assigned to:  None
Originator Name:  Gazi Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 12 Dec 2020 03:33:39 AM UTC, comment #4: 

This is a duplicate of bug #55682.

Rik <rik5>
Group administrator
Wed 09 Dec 2020 04:32:37 PM UTC, comment #3: 

Marking as a feature request.  The "matlab compatibility" tag has a narrow meaning here.  It's reserved for things that work in work in reasonable but different ways in both Octave and Matlab.  Since this is something that doesn't yet work, I consider it a request for a new feature.

John W. Eaton <jwe>
Group administrator
Wed 09 Dec 2020 04:22:53 PM UTC, comment #2: 

confirmed. according to the Matlab help, the function behavior was expanded in 2014
https://www.mathworks.com/help/matlab/ref/round.html

"Behavior changed in R2014b

In R2014b, these syntaxes were added to round to any number of decimal or significant digits and to round duration values:

Y = round(X,N)
Y = round(X,N,type)
Y = round(t) 
Y = round(t,unit)  
Older versions of MATLABĀ® support only this syntax, which rounds to the nearest integer:

Y = round(X) "

Nicholas Jankowski <nrjank>
Group Member
Wed 09 Dec 2020 01:36:30 PM UTC, comment #1: 

Confirmed.

In the mapping package there's a roundn() that accepts the first two arguments; maybe that can help you somewhat.

Philip Nienhuis <philipnienhuis>
Group Member
Wed 09 Dec 2020 12:00:07 PM UTC, original submission:  


Gazi Aliev <gazi>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

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 jwe (Posted a comment)
  • -email is unavailable- added by nrjank (Posted a comment)
  • -email is unavailable- added by gazi (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 11 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-12-12 rik5 StatusConfirmed Duplicate
        Open/ClosedOpen Closed
        Operating SystemMicrosoft Windows Any
        Dependencies- Depends on bugs #55682
    2020-12-11 jwe Severity2 - Minor 1 - Wish
    2020-12-09 jwe Item GroupMatlab Compatibility Feature Request
        Release6.1.0 dev
        SummaryIn Matlab, round() can be called with 3 arguments: round(X,N,type), while in Octave with one argument only: round(X) round: accept N and TYPE arguments
    2020-12-09 philipnienhuis Severity3 - Normal 2 - Minor
        Priority5 - Normal 3 - Low
        StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code