the maximum value for n is 50:
clc;clear all;close all;
A=1000; %investment
r=0.04; % interest rate
k=10; %years
for n=1:50;
V=A*(1+r/n)^(n*k);
end
display(V)
l=A*exp(r*k)
output:
V =
1.4916e+03
l =
1.4918e+03
for the max value for n=100:
clc;clear all;close all;
A=1000; %investment
r=0.04; % interest rate
k=10; %years
for n=1:100;
V=A*(1+r/n)^(n*k);
end
display(V)
l=A*exp(r*k)
output:
V =
1.4917e+03
l =
1.4918e+03
for n max value is 200:
clc;clear all;close all;
A=1000; %investment
r=0.04; % interest rate
k=10; %years
for n=1:200;
V=A*(1+r/n)^(n*k);
end
display(V)
l=A*exp(r*k)
output:
V =
1.4918e+03
l =
1.4918e+03
as increasing the value of n,at n=200 both the values are gets equal.
use matlab love you 8.7 If an amount of money A is invested for k years at a nominal annual interest rate r (expressed...