Hi, I have a large array of values and would like to find a way to calculate the change in value for each period. I have been attempting to use a for command with an array to do this, but I have not been successful at all. The basic idea is this:
Value1 = A
Value 2 = B
Value 3 = C
Value 4 = D
Value 5 = D
...
I wish to return
Change1 = (B - A)/A
Change 2 = (C - B)/B
Change 3 = (D - C)/C
Change 4 = (E - D)/D
...
I have an array of a couple thousand values, so I would like to automate this.
Also, I am quite novice at C++.
I really appreciate any advice that you guys can offer. Thanks in advance.