%% Create a RateSpec Using Two Curves
% Define data for the interest-rate term structure and use intenvset to create a RateSpec.

StartDates = '01-Oct-2011'; 
EndDates = ['01-Oct-2012'; '01-Oct-2013';'01-Oct-2014';'01-Oct-2015'];
Rates = [[0.0356;0.041185;0.04489;0.047741],[0.0325;0.0423;0.0437;0.0465]];
RateSpec = intenvset('Rates', Rates, 'StartDates',StartDates,...
'EndDates', EndDates, 'Compounding', 1)

%
% To look at the Rates for the two interest-rate curves:

RateSpec.Rates

% Copyright 2015 The MathWorks, Inc.