Problem 2:
When interest is compounded continuously, the following equation represents the growth of your
savings:
P = P_0e^{rt}
In the above equation,
P = current balance
P_0 = initial balance
r = growth constant, expressed as a decimal fraction
t = time invested
Determine the amount in your account at the end of each year if you invest $1000 at 8% (0.08) for 30
years (make a nicely formatted and clearly labeled table)
Create a figure (Figure 3) with 4 subplots. Plot time (t) on the x-axis and current balance (P) on the y-
axis:
a) In the first quadrant, plot t versus P in a rectangular (Cartesian) coordinate system.
b) In the second quadrant, plot t versus P, scaling the x-axis logarithmically.
c) In the third quadrant, plot t versus P, scaling the y-axis logarithmically.
d) In the fourth quadrant, plot t versus P, scaling both axes logarithmically.
Which of the four plotting techniques do you think displays the data best?
Make sure that each plot has a proper title, x-axis and y-axis labels (including units), and a grid.
MATLAB Requirements:
— Be sure to include adequate commenting and spacing.
— Be sure to display your results appropriately, not just leave off semi-colons.
— Make sure that the script runs without any errors, and produces expected results.
— Follow a script format similar to the one for Homework 1 to ensure that each problem is being
solved in a separate section within the script, and the workspace and the command window are
cleared at the beginning of each section.