Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: MATLAB date issue
Replies: 4   Last Post: Sep 16, 2013 1:10 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Sudip

Posts: 6
Registered: 1/4/11
MATLAB date issue
Posted: Sep 13, 2013 2:57 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I am trying to convert NCEP 2 reanalysis dates to a matlab date format.
The time-series I am using from NCEP has a starting time : time(1)= 1709328;
with a reference, 'hours since 1800-1-1 00:00:0.0 (dj=datenum(1800,1,1))''. Matlab uses a different reference date which is dm=datenum(1950,1,1)
when I use the date-shift (dm-dj) and try to use datestr to find the date for time(1)=1709328, it gives me datestr(time(1)-dj+dm)
ans =23-Dec-4829----- which does not make sense.

When I use ---datestr(time(1)+dj-dm)

ans =24-Dec-4529---- it does not make sense too.

Can anybody help to get the exact time for datenum=1709328

Thanks in advance,
Sudip



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.