Hi I am trying to split the values in a (y2)
list into (inv)
amount of parts.
x = [0,100,200,300,400,500,600,700,800,900,1000,1100]
y2 = [58,55,49,12,6,5,4,4.5,35,48,56,58]
interval = 5
inv = (x[0] + x[1])/interval
I will like to split y2 into inv parts so my answer should be:
[58 57.85 57.7 57.55 57.4 57.25 57.1 56.95 56.8 56.65 56.5 56.35 56.2 56.05 55.9 55.75 55.6 55.45 55.3 55.15 55...…….49...…………..12...….6 ………...5...……..]
I will like to mention that inv will always be (x[0] + x[1])/interval
I would go with
Not sure I understood you correctly, but if I did, this would be one way of doing it:
Which results in: