today = datenum('20110609','yyyymmdd'); today =734663D = 20110609;d = datenum('D','yyyymmdd')d =734504
Why cannot the above code work ???????????????????
d1 = datenum('20110610','yyyymmdd');d2 = datenum('20110716','yyyymmdd');d2-d1 % it gives me 36, number of days between these two dates
HOWEVER, if I have a vector of time D(N,1), N is more than 100 K.
It looks like this: (and not sorted)
maturity = [201106182011061920110716201107182011071920111217...];
And I wanna to get a vector of tenor, from the date in the vector to today's date: 20110610.
How may I do that? Obviously I cannot type them in…
Any experts, plz help! Thx in advance!
Best Answer