MATLAB: Produce a Date vector starting with a desired date

date vector

Dear all, I am trying to produce a date vector, which includes year and month I would like to start With July 1926, and end with December 2014. Optimally, the format should be YYYYMM.
Thank you very much in advance!
Chris

Best Answer

This seems to work:
date1 = datenum('192607','yyyymm');
date2 = datenum('201412','yyyymm');
datev = date1:(365.25/13):date2;
result = unique(datestr(datev, 'yyyymm'),'rows');
sample = result(1:24,:) % Sample Output