bugGNU Octave - Bugs: bug #46340, move deg2rad/rad2deg from nurbs or...

 
 

bug #46340: move deg2rad/rad2deg from nurbs or mapping to core

Submitted by:  None
Submitted on:  Fri 30 Oct 2015 07:55:28 PM UTC  
 
Category: Octave FunctionSeverity: 1 - Wish
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: FixedAssigned to: None
Originator Name: Originator Email: -unavailable-
Open/Closed: ClosedRelease: dev
Operating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

(Jump to the original submission Jump to the original submission)

Mon 23 Nov 2015 08:46:30 PM UTC, comment #8:

Philip Nienhuis on comment #7:

> Would that solution be useful for various other packages with functions shadowing core functions, like specfun, odepkg, tsa (detrend) ?


I don't see why not. I'm using the same approach on the image package because Matlab has moved a series of its function from their toolbox to its core.

Carnë Draug <carandraug>
Project Member
Mon 23 Nov 2015 06:34:04 PM UTC, comment #7:

@Carnë:
Would that solution be useful for various other packages with functions shadowing core functions, like specfun, odepkg, tsa (detrend) ?

Philip Nienhuis <philipnienhuis>
Project Member
Mon 23 Nov 2015 01:00:15 PM UTC, comment #6:

I have pushed a configure script for the mapping package so that it only includes those functions if they are not being supplied by core

http://hg.code.sf.net/p/octave/mapping/rev/81695768f6a9

Carnë Draug <carandraug>
Project Member
Mon 23 Nov 2015 03:17:04 AM UTC, comment #5:

I added clean room implementations of rad2deg and deg2rad to the core in this changeset (http://hg.savannah.gnu.org/hgweb/octave/rev/e44d904ac525). Marking as fixed and closing report.

Rik <rik5>
Project Administrator
Sun 01 Nov 2015 03:14:37 PM UTC, comment #4:

Agree with comment #3. Matlab is a moving target and they often make one decision, only to reverse it later.

Conceptually, these are very trivial functions to implement so I don't see a problem with adding them to core. They should probably go in the scripts/general directory along with other conversions like cart2pol.m.

Rik <rik5>
Project Administrator
Sat 31 Oct 2015 07:18:15 PM UTC, comment #3:

Matlab is crazy. Originally had rad2deg and deg2rad in the mapping toolbox. Then it renamed those as radtodeg and degtorad, also in the mapping toolbox. And now brings back rad2deg and deg2rad and places them in core.

Anyway, to answer the question, the function in nurbs and mapping have the same interface but the implementation in the mapping toolbox will be faster. http://hg.code.sf.net/p/octave/mapping/rev/092dc26b88b7

If N is the number of angles, the implementation in mapping performs one division and N multiplications, while the one in nurbs performs N divisions and N multiplications.

Consider:

Carnë Draug <carandraug>
Project Member
Sat 31 Oct 2015 04:24:17 PM UTC, comment #2:

Makes sense to me too :-)
Which one(s) is/are the best, or are the versions in nurbs and mapping identical?

Philip Nienhuis <philipnienhuis>
Project Member
Sat 31 Oct 2015 04:27:55 AM UTC, comment #1:

Actually these functions are both in the nurbs package AND in the mapping package, so moving them to core really makes sense to me.

Carlo de Falco <cdf>
Project Member
Fri 30 Oct 2015 07:55:28 PM UTC, original submission:

deg2rad/rad2deg have been introduced in matlab R2015b:

http://nl.mathworks.com/help/matlab/ref/deg2rad.html

For octave they are in the nurbs package

http://octave.sourceforge.net/nurbs/function/deg2rad.html

Maybe move these to core?

Anonymous

 

(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 cdf (Posted a comment)
  •  

    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 23 Nov 2015 03:17:04 AM UTCrik5StatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Sun 01 Nov 2015 03:14:37 PM UTCrik5Severity3 - Normal=>1 - Wish
      StatusNone=>Confirmed
    Sat 31 Oct 2015 07:18:15 PM UTCcarandraugSummarymove deg2rad/rad2deg from nurbs to core=>move deg2rad/rad2deg from nurbs or mapping to core

    Back to the top


    Powered by Savane 3.1-cleanup1