Interest rate - stagnant years.

조회 수: 1 (최근 30일)
Christoffer Hansen
Christoffer Hansen 2016년 3월 20일
편집: Roger Wohlwend 2016년 3월 21일
Hi.
I need to solve an assignment, where I need to know the end balance.
The assignment:
I have an account with an interest rate on 5%. A period over 10 years. 1000 dollars to start.
I need to know how to solve the assignment, where the first two years are stagnant, with no interest rate, so the balance after 2 years are still 1000 dollars, but from year 3 to 10, the interest rate will aply.
I need to create a vector, so I can see the balance for each year. How do I solve this??
Thanks in advance.

채택된 답변

Roger Wohlwend
Roger Wohlwend 2016년 3월 21일
편집: Roger Wohlwend 2016년 3월 21일
Define a vector with the interest rate for each year.
r = [zeros(1,2), 0.05*ones(1,8)]
Then the account Balance for each year is
1000 * cumprod(1+r)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by