Inflate

버전 1.0.0.0 (3.24 KB) 작성자: Skynet
Adjust for inflation using the CPI Inflation Calculator at BLS.gov.
다운로드 수: 1.8K
업데이트 날짜: 2007/7/4

라이선스 보기

inflate(AMT,YEAR1,YEAR2) adjusts the value of the US dollar amount AMT for inflation as per the consumer price index, from what AMT was in year YEAR1 to what it was in year YEAR2. This is done using the CPI Inflation Calculator provided by the Bureau of Labor Statistics.

AMT can be any dollar amount. YEAR1 and YEAR2 each can both be any year from 1913 to the current year. YEAR2 is optional, with its default value being the current year.

EXAMPLES:

inflate(100,1913,2007) returns 2055.5455. This indicates that $100 in the year 1913 had the same purchasing power as $2,055.55 in the year 2007.

inflate(100,2007,1913) returns 4.8649

inflate(1,1975,2000) returns 3.2007

inflate(10.00,2001) returns 11.4906

amts=[100,10,1000];
years1=[2000,1925,1950];
years2=repmat(2007,size(amts));
amts_new=arrayfun(@inflate,amts,years1,years2) returns [118.1760, 116.2851, 8443.9419]

REMARKS:

Internet connectivity is required for this function to work.

This function will stop working if BLS changes its CPI Inflation Calculator page in a way that is sensitive to this function.

The URL to the CPI Inflation Calculator page is http://data.bls.gov/cgi-bin/cpicalc.pl

A "persistent" variable is used, so BLS is queried only once per session for every new combination of years.

It is of course possible to perform adjustment calculations entirely offline - this is warranted in any production environment. This is possible as long as historical CPI or inflation rates are available. By querying BLS, this function takes a somewhat lazy approach.

[Please subscribe to this file if you use it, so you can be notified of updates.]

인용 양식

Skynet (2024). Inflate (https://www.mathworks.com/matlabcentral/fileexchange/14457-inflate), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2007a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Financial Toolbox에 대해 자세히 알아보기
도움

줌: Adjust Per-capita

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0

Added MATLAB version check.