The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

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 ]

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,

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

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.