I just need to know how to enter this into MatLab to have itsolve the problem. W
ID: 3610322 • Letter: I
Question
I just need to know how to enter this into MatLab to have itsolve the problem. When interest is compounded continuously, the followingequation represents the growth of your savings. P = Poert where P is the currentbalance Po is the initialbalance r is the growth rate, expressed as a decimal fraction t isthe time invested Determine the amount in your account at the end of each yearif you invest $1000 at 8 percent (0.08) for 30 years. Plottime on the x-axis and current balance on the y-axis. I just need to know how to enter this into MatLab to have itsolve the problem. When interest is compounded continuously, the followingequation represents the growth of your savings. P = Poert where P is the currentbalance Po is the initialbalance r is the growth rate, expressed as a decimal fraction t isthe time invested Determine the amount in your account at the end of each yearif you invest $1000 at 8 percent (0.08) for 30 years. Plottime on the x-axis and current balance on the y-axis. where P is the currentbalance Po is the initialbalance r is the growth rate, expressed as a decimal fraction t isthe time invested Determine the amount in your account at the end of each yearif you invest $1000 at 8 percent (0.08) for 30 years. Plottime on the x-axis and current balance on the y-axis.Explanation / Answer
>> format bank
r = 0.08;
p0 = 1000;
for t = 0:30
p1 = (1+r)^t*p0;
p2 = (1+r/12)^(12*t)*p0;
p3 = exp(r*t)*p0;
disp([t p1 p2 p3])
end
0 1000.00 1000.00 1000.00
1.00 1080.00 1083.00 1083.29
2.00 1166.40 1172.89 1173.51
3.00 1259.71 1270.24 1271.25
4.00 1360.49 1375.67 1377.13
5.00 1469.33 1489.85 1491.82
6.00 1586.87 1613.50 1616.07
7.00 1713.82 1747.42 1750.67
8.00 1850.93 1892.46 1896.48
9.00 1999.00 2049.53 2054.43
10.00 2158.92 2219.64 2225.54
11.00 2331.64 2403.87 2410.90
12.00 2518.17 2603.39 2611.70
13.00 2719.62 2819.47 2829.22
14.00 2937.19 3053.48 3064.85
15.00 3172.17 3306.92 3320.12
16.00 3425.94 3581.39 3596.64
17.00 3700.02 3878.65 3896.19
18.00 3996.02 4200.57 4220.70
19.00 4315.70 4549.22 4572.23
20.00 4660.96 4926.80 4953.03
21.00 5033.83 5335.72 5365.56
22.00 5436.54 5778.59 5812.44
23.00 5871.46 6258.21 6296.54
24.00 6341.18 6777.64 6820.96
25.00 6848.48 7340.18 7389.06
26.00 7396.35 7949.41 8004.47
27.00 7988.06 8609.20 8671.14
28.00 8627.11 9323.76 9393.33
29.00 9317.27 10097.63 10175.67