%% Create IRDataCurve Object
% This example shows how to create an IRDataCurve object for an interest-rate curve.
% Define the type of interest-rate curve, Settle date, Dates, and Data.

CurveSettle = datenum('2-Mar-2016');
Data = [2.09 2.47 2.71 3.12 3.43 3.85 4.57 4.58]/100;
Dates = datemnth(CurveSettle,12*[1 2 3 5 7 10 20 30]);

%
% Use IRDataCurve to create an IRDataCurve object.

irdc = IRDataCurve('Zero',CurveSettle,Dates,Data,'Compounding',4,'Basis',4)

% Copyright 2021 The MathWorks, Inc.