www.gusucode.com > fininst 案例源码程序 matlab代码 > fininst/IRFunctionCurveObjectToARateSpecExample.m
%% 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. %% % Copyright 2015 The MathWorks, Inc. irfc = IRFunctionCurve('Forward',today,@(t) polyval([-0.0001 0.003 0.02],t)); toRateSpec(irfc, today+30:30:today+365)