Interpolate multiple curve between 2 existing curves using Python

Viewed 57

I have 2 curves for the different speed and I want to interpolate multiple curves between these existing curves. For example, the curve is for the speed 10km/h and another is for 20km/h. So now I want to interpolate curves for 11, 12, 13 till 19 km/h (10 curves from these 2 existing curves).

The similar problem has been solved using MATLAB. But I can't figure it out in Python.

The data for the plot is here:

import matplotlib.pyplot as plt

a50=[1.05, 0.931818182, 0.932, 0.968181818,1.045454545,1.136363636,1.354545455, 1.568181818, 1.718181818,1.945454545,2.159090909,2.454545455,2.772727273]

vel50=[0.85,0.705555556,0.605555556,0.533333333,0.472222222,0.45,0.427777778,0.45,0.477777778,0.533333333,0.611111111,0.711111111,0.827777778]

a25=[0.5, 0.613636364,0.686363636,0.795454545,0.918181818,0.963636364,1.090909091,1.236363636 ,1.304545455,1.431818182,1.545454545,1.659090909,1.818181818]

vel25= 
[0.425555556,0.354444444,0.302222222,0.266666667,0.233333333,0.226666667,0.211111111,0.222222222,0.237777778,0.266666667,0.311111111,0.35,0.402222222]

plt.plot(a25,vel25,'b-')

plt.plot(a50,vel50,'g-')
0 Answers
Related