clear; close all % % Compounding at various intervals % Compare exponential form (n--> inf) % P = 100; %% Principal n = 12 %% Number of times per year balance is compounded t = 10; %% Number of years r = 0.05; %% Interest rate B = P*(1+r/n)^(n*t) B = P*exp(r*t)