octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: datenum with fractional months


From: David Bateman
Subject: Re: datenum with fractional months
Date: Sun, 20 May 2012 23:54:35 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1

On 05/20/2012 11:35 PM, Ben Abbott wrote:
> On May 20, 2012, at 3:28 PM, David Bateman wrote:
>
>> Looking at the bug #36482 it seems that the issue is that datetick is
>> calling datenum with a fractional month, which is not currently allowed
>> with Octave's datenum function. However the fix could either go into
>> datetick or datenum. I suppose it would be best to follow what matlab
>> does in this case. Could someone with access to matlab tell me what
>>
>> datenum(2012,5.5)
>> datenum(2012,5.5,15)
>>
>> give?
>>
>> Thanks
>> David
>>
> datenum (2012, 5.5)
>
> Warning: Unless the first input argument is a date string, all subsequent
> arguments will be ignored. 
>> In datevec at 69
>   In datenum at 118 
>
> ans =
>
>         2012
>
> datenum (2012, 5.5, 15)
>
> ans =
>
>       735004
>
> Ben
>
>

Thanks Ben, it seems that matlab's datenum accepts fractional months, so
the fix for #36482 should be in datenum

D.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]