# How can I create a for loop that takes the number 500 and multiplies it by 1.1 every 7 steps (7,14,21,...), meaning that i want the answer as follows: 500.... 500*1.1...​.500*1.1*1​.1....500*​1.1*1.1*1.​1 etc

1 view (last 30 days)
May Kh on 15 May 2021
Commented: May Kh on 16 May 2021
How can I create a for loop that takes the number 500 and multiplies it by 1.1 every 7 steps (7,14,21,...), meaning that i want the answer as follows: 500.... 500*1.1....500*1.1*1.1....500*1.1*1.1*1.1 etc

Image Analyst on 15 May 2021

Fake Name Johnson on 15 May 2021
Here's a start
a = 500;
k = 1.1;
p = 0:5;
s = 7;
x = a*k.^p;
x = repelem(x,s)
just adjust p as needed to get the desired length.
May Kh on 16 May 2021
The for loop is not mandatory... But for the problem I have I should do this for 210 years every 7 years... And the answer I get from each 7 should be added together for the purpose of my question.. I haven't been specific with the question itself since it has lots of equations and calculations to do... The for loop would serve the best at what I'm trying to do :)