Borrar filtros
Borrar filtros

compunding investment every month

1 visualización (últimos 30 días)
jean claude
jean claude el 3 de Abr. de 2016
Editada: grim fin el 9 de Mzo. de 2022
hi, i have vector X=[ 0.35; 0.05; 0.06 ;0.07] i want to have y=[100*1.35 ; 100*1.35*1.05 ; 100*1.35*1.05*1.06 ; 100*1.35*1.05*1.06*1.07]
its like compunding my investment 100 $ every month any help?

Respuesta aceptada

Kuifeng
Kuifeng el 3 de Abr. de 2016
X=[ 0.35; 0.05; 0.06 ;0.07];
x1 = 1+X;
base = 100;
y = base.*x1(1);
for i = 2:length(X)
y(i) = y(i-1)*x1(i);
end
  2 comentarios
jean claude
jean claude el 3 de Abr. de 2016
thank you for high speed answer !
Kuifeng
Kuifeng el 3 de Abr. de 2016
you are welcome, just happened to be reading your questions.

Iniciar sesión para comentar.

Más respuestas (1)

grim fin
grim fin el 15 de Feb. de 2022
Editada: grim fin el 9 de Mzo. de 2022
Thanks a lot

Categorías

Más información sobre Get Started with MATLAB en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by