Week 10 assignment

profileAbdulla99
ee200.m

%% A. Inflation Analysis on College Costs clc; cla; clf; clear; close all; % Initial Clean-up for multiple tries format short; format compact; % Set preferences i = 0.03; % 3% annual average inflation P = 3.5; % Annual cost in 1980 (k$) n = 40; % Years from 1980 to 2020 Fi = P*(1+i)^(n) % Projected annual cost based on inflation Fa = 30; % Actual annual cost in 2020 (k$) ia = (Fa/P)^(1/n) - 1; % Effective average inflation rate for annual college costs iap = ia*100 % Effective average inflation rate in percent %% B. Retirment Savings Comparison of 1 Fred, 2 Wilma, 3 Barney, 4 Betty, 5 Dino clc; cla; clf; clear; close all; % Initial Clean-up for multiple tries format short; format compact; % Set preferences i = 0.1 % 10% annual interest compounded annually N = [ 30 35 40 45 45 ]; % Years invested prior to age 65 n = [ 20 20 15 10 45 ]; % Years providing deposits A = [ 10 7.5 5 5 2 ]*1e-3; % Annual deposit to retirement (M$) disp(' Fred Wilma Barney Betty Dino in M$') F = A.*( ( (1+i).^(n) - 1 ) / i ).*(1+i).^(N-n) %% C. Loan Calc in k$ clc; cla; clf; clear; close all; % Initial Clean-up for multiple tries format compact; % Set preferences P = 25 % Loan amount in k$ i = 0.07/12 % loan interest rate for 7% interest with monthly payments n = 10*12 % Term is 10 years with monthly payments FoP = (1+i)^n; % F/P equation A = P*( ( i*FoP ) / ( FoP - 1 ) ) % Monthly Payments Ci = n*A - P % Cumulative interest paid (no time value adjustment)