How to compute relative change from starting to ending ?
Show older comments
Accepted Answer
More Answers (1)
Star Strider
on 20 Oct 2014
rel_change = (x(end)-x(1))/x(1);
4 Comments
Abinet
on 21 Oct 2014
Please, Abinet, clarify your question by editing the original text. Hiding important details in comments of answers is not optimal.
Notice that readers do not have the faintest idea, what a "record of column" is and "logs" cna mean different things also. "Relative change from the start to the end" is not exactly defined mathematically. Please post a short example of your data and the wanted result. A vector of 4 elements should be sufficient.
Abinet
on 21 Oct 2014
Again: Please clarify the question by editing the original question. This is the place where readers expect and find all information. Comments disappear soon in the standard display, when further comments are posted.
Please do not use a random input and no output to define the mathematical meaning of your question. What do you expect for:
x = [1,3,-2,10]
? And please add this to the question above, not as an comment. Thanks.
Categories
Find more on Parallel Computing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!