MATLAB: How to obtain the end of month dates for a time interval

dates

if i have two dates that constitute a time interval such as : 726864 and 734169 is it possible to compute the end of month dates for the whole time interval?

Best Answer

d = [726864,734169]
dv = datevec(d(1):d(2));
d2 = unique(dv(:,1:2),'rows');
dm = eomday(d2(:,1), d2(:,2))