Resource
Mortgage explorer (MATLAB app)
A MATLAB app I built for looking at the finances of buying a house — equity, debt, and break-even over time.
A MATLAB-based app to help look at the finance side of buying a house.
This .zip contains an .exe that runs independently of MATLAB — though the MATLAB Runtime must be installed. The app is a work in progress, so ignore the spelling errors (or don't).

How the code works
When you open the app it shows some text on the right and a graph on the left (an example scenario to start). The tabs “Property details”, “Mortgage details”, and “Payment details” hold the entries that change per property; more options live under “Advanced settings.”
The graph plots value vs. time. The green curve is your equity in the property (it doesn't start at zero because of the down payment). The dashed line is the home's value over time (by default assumed to grow 1% per year). The red curve is how far you're “in the red” (debt plus unrecoverable costs such as buying and selling). The vertical black line is the break-even time — when the growth in equity equals the cost of buying and selling.
The text on the right is meant to be self-explanatory; hover over any entry field for a tooltip explanation.
How to edit the code

If you want to see the guts of the calculations, here is the source .mlapp file (inside a .zip). Save it as Mortgage.mlapp, open MATLAB, choose New → App, and open the file. In Code View, scroll to the function Calculate() — that's where all the action is. Enjoy!
↓ Download the source (.mlapp in .zip)
← Back to all resources