% function mortgage
% mortgage(67912.5, 4.98454, 15)
function payment = mortgage(principal, interest, years)
I = interest/(100*12);
months = years*12;
payment0 = principal/months;
payment = fzero(@iter,payment0,[],principal,I,months)

function balance = iter(payment,principal, I, months)
balance = principal;
for i = 1:months
balance = balance*(1+I)-payment;
end