%% Convert an IRFunctionCurve Object to a RateSpec
% This example shows how to convert an IRFunctionCurve object to a RateSpec. First, an IRFunctionCurve object is created using the function IRFunctionCurve constructor, then a RateSpec structure is created using the toRateSpec method.

irfc = IRFunctionCurve('Forward',today,@(t) polyval([-0.0001 0.003 0.02],t));
toRateSpec(irfc, today+30:30:today+365)

% Copyright 2015 The MathWorks, Inc.