Reputation: 618
How is it possible to add an element in a vector to the previous elements. For example:
data = [1,3,5,6,7,9];
newData = [1,4,9,15,22,31];
How would I get from data to newData? I want to keep the first element, then add this to the second, add the combination of these to the third and so on.
Upvotes: 1
Views: 996