Simple mortgage calculator
% Computer mortgage payment and the respective interest paid each month
%
% Inputs
% L: size of the loan
% rate: annual rate
% years: length of loan in years
%
% Outputs
% P: monthly payment
% In: list of interests paid over the entire loan period
% Ba: Remaining balane over the entire loan period
% please run mortgage_example for detail
% below is an excerpt.
years=20;
annual_rate=0.04; % 4% annual rate
house_value=150000;
downpayment=0.25; % 25% down
loan_size=house_value*(1-downpayment);
[P,In,Ba]=compute_mortgage(loan_size,annual_rate,years);
Zitieren als
Samuel Cheng (2024). Simple mortgage calculator (https://www.mathworks.com/matlabcentral/fileexchange/37968-simple-mortgage-calculator), MATLAB Central File Exchange. Abgerufen .
Kompatibilität der MATLAB-Version
Plattform-Kompatibilität
Windows macOS LinuxKategorien
- Computational Finance > Financial Toolbox >
- Computational Finance > Financial Instruments Toolbox > Price Instruments Using Functions > Mortgage-Backed Securities >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Live Editor erkunden
Erstellen Sie Skripte mit Code, Ausgabe und formatiertem Text in einem einzigen ausführbaren Dokument.
Version | Veröffentlicht | Versionshinweise | |
---|---|---|---|
1.0.0.0 |