Mortgage repayment option in matlab

1 view (last 30 days)
I have data for 4 years starting from 2015-2019. The array called HP contains house prices [677000,645000,698950,674995]. Interest rate on mortgage(MR) is [0.0397,0.0420,0.0395,0.04510]. And mortage is payed back in 30 years. I want to find the monthly repayment and I am useing this eqution: MP=[P(r/12)(1+r/12)^n]/[(1+r/12]^n)-1]
MP = HP(MR/12)(1+(MR/12))^360]/[(1+(MR/12)^360)-1]
I am not sure what i am doing wrong as I am getting error messages

Accepted Answer

Sulaymon Eshkabilov
Sulaymon Eshkabilov on 18 Oct 2021
MP =(HP.*(MR/12).*(1+MR/12).^360)./(((1+MR/12).^360)-1)
MP = 1×4
1.0e+03 * 3.2204 3.1542 3.3168 3.4241

More Answers (0)



Community Treasure Hunt

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

Start Hunting!