Code covered by the BSD License  

Highlights from
Mortgage Amortization

Be the first to rate this file! 4 Downloads (last 30 days) File Size: 3.14 KB File ID: #22575
image thumbnail

Mortgage Amortization

by Rick Rosson

 

03 Jan 2009 (Updated 01 Jul 2009)

Calculates the monthly payment and amortization schedule for a fixed-rate mortgage.

| Watch this File

File Information
Description

This MATLAB(R) function computes the monthly payment and optionally generates an HTML representation of the mortgage amortization schedule.

The function takes four input arguments:
1. The amount borrowed (dollars)
2. The annual percentage rate (percent per year)
3. The time to maturity (years)
4. A boolean flag indicating whether to generate the HTML Report

The first input argument is required, while the other three are optional (see "Syntax" below).

The function returns one output argument: the monthly payment (in dollars per month) required to pay back the loan.

Syntax:
payment = mortgage(borrowed,apr,ttm,doReport);
payment = mortgage(borrowed,apr,ttm);
payment = mortgage(borrowed,apr);
payment = mortgage(borrowed);

The ZIP file contains two M-functions:
1. mortgage.m is the function that computes the monthly payment and amortization schedule.
2. comma.m is an external utility function that converts a numeric input argument to a comma-formatted string. For more information, please type
>> help comma
at the MATLAB Command Prompt.

MATLAB release MATLAB 7.7 (R2008b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Updates
01 Jul 2009

Description Only: Updating description field to include Registered Trademark symbol on the word "MATLAB".

Tag Activity for this File
Tag Applied By Date/Time
finance Rick Rosson 05 Jan 2009 16:17:26
mortgage Rick Rosson 05 Jan 2009 16:17:26
html Rick Rosson 05 Jan 2009 16:17:26
amortization Rick Rosson 05 Jan 2009 16:17:26
apr Rick Rosson 05 Jan 2009 16:17:26
present value Rick Rosson 14 Jan 2009 12:02:31
formatting Rick Rosson 30 Jan 2009 21:50:46
comma Rick Rosson 30 Jan 2009 21:50:46
interest rate Rick Rosson 30 Jan 2009 21:50:46
personal finance Rick Rosson 30 Jan 2009 21:51:21
annuity Rick Rosson 30 Jan 2009 21:51:46
www Rick Rosson 30 Jan 2009 21:52:29
economics Rick Rosson 30 Jan 2009 21:53:50
equity Rick Rosson 30 Jan 2009 21:54:12
home buying Rick Rosson 30 Jan 2009 21:54:52

Contact us at files@mathworks.com