%% Create inflationcurve Object
% Create an inflationcurve object using inflationcurve.

BaseDate = datetime(2020, 9, 20);
InflationTimes = [0 calyears([1 2 3 4 5 7 10 20 30])]';
InflationIndexValues = [100 102 103.5 105 106.8 108.2 111.3 120.1 130.4 150.2]';
InflationDates = BaseDate + InflationTimes;

myInflationCurve = inflationcurve(InflationDates,InflationIndexValues)

% Copyright 2020 The MathWorks, Inc.