%% Dates From Time and Frequency
% This example shows how to compute dates from time and frequency.

Settle = '1-Sep-2002';
Maturity = datenum(['31-Aug-2005'; '28-Feb-2006'; '15-Jun-2006'; 
                 '31-Dec-2006']);
Compounding = 2;
Basis = 0;
EndMonthRule = 1;
Times = date2time(Settle, Maturity, Compounding, Basis, EndMonthRule)

Dates_calc = time2date(Settle, Times, Compounding, Basis, EndMonthRule)
datestr(Dates_calc)

% Copyright 2020 The MathWorks, Inc.