主要内容

indexvalues

计算指数的值inflationcurve对象

自从R2021a

描述

例子

outIndexValues= indexvalues (inpInflationCurve,inpDates)计算通货膨胀指数的值inflationcurve对象(inpInflationCurve)基于通货膨胀指数结束日期(inpDates)。

例子

全部折叠

创建一个通货膨胀曲线对象使用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);

计算使用的索引值indexvalues

outIndexValues = indexvalues (myInflationCurve datetime(20) 2023年,9日)
outIndexValues = 105

输入参数

全部折叠

通货膨胀曲线,指定使用以前创建的inflationcurve对象。

数据类型:对象

通货膨胀指数结束日期,指定为一个NINST——- - - - - -1使用datetime向量数组,字符串数组,或日期特征向量。

支持现金宝app有的代码,indexvalues还接受连续日期数据作为输入,但不推荐。

输出参数

全部折叠

输出通货膨胀指数的价值观,作为一个数字返回。

版本历史

介绍了R2021a

全部展开