bugGNU Octave - Bugs: bug #47026, datenum on Matlab accepts a date...

 
 

bug #47026: datenum on Matlab accepts a date number

Submitted by:  Richard <crobar>
Submitted on:  Sat 30 Jan 2016 11:47:08 PM UTC  
 
Category: Octave FunctionSeverity: 1 - Wish
Priority: 1 - LaterItem Group: Matlab Compatibility
Status: ConfirmedAssigned to: None
Originator Name: Richard CrozierOpen/Closed: Open
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Sat 12 Mar 2016 10:12:20 PM UTC, comment #5:

Sorry, being a newbie in mercurial ,I seriously messed up my first patch .
these two file make the patch for the given bug.
patch:
https://savannah.gnu.org/bugs/download.php?file_id=36612.
update-patch
https://savannah.gnu.org/bugs/download.php?file_id=36614.

SatyamPandey <spandey>
Sat 12 Mar 2016 10:03:44 PM UTC, comment #4:

if matlab is given

(file #36614)

SatyamPandey <spandey>
Mon 01 Feb 2016 08:38:00 AM UTC, comment #3:

Fair enough, in my case it was convenient for implementing a dateadd function. Just means adding an extra if clause.

Richard <crobar>
Sun 31 Jan 2016 11:45:25 PM UTC, comment #2:

This looks like undocumented Matlab behavior. See official documentation at http://www.mathworks.com/help/matlab/ref/datenum.html. We usually don't bother to try and follow the undocumented stuff since it could change at any point in the future. Also, I don't think it's so bad to warn if the user is likely to be calling a function in an incorrect manner.

Rik <rik5>
Project Administrator
Sat 30 Jan 2016 11:55:25 PM UTC, comment #1:

Looks like it just returns any numeric vector passed in except a 6 element one:

Richard <crobar>
Sat 30 Jan 2016 11:47:08 PM UTC, original submission:

In Matlab a date number is a valid input to datenum, on Octave it is an error:

Matlab

Octave

Richard <crobar>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #36614:  47026_1.diff added by spandey (1KiB - text/x-patch - update-patch)
file #36612:  47026.diff added by spandey (6KiB - text/x-patch - I have tried to make datenum function similar to matlab. Hope it works.Thisi i the )

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by spandey (Updated the item)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by crobar (Submitted the item)
  •  

    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
    Sat 12 Mar 2016 10:03:44 PM UTCspandeyAttached File-=>Added 47026_1.diff, #36614
    Sat 12 Mar 2016 09:41:02 PM UTCspandeyAttached File-=>Added 47026.diff, #36612
    Sun 31 Jan 2016 11:45:25 PM UTCrik5Severity3 - Normal=>1 - Wish
      Priority5 - Normal=>1 - Later
      StatusNone=>Confirmed

    Back to the top


    Powered by Savane 3.1-cleanup1