Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
関数の座標xを持つ2つの配列があります。y
x
y
例:
x=[0,1,2,3,4,5] y=[0,1,5,20,30,32]
pylab.plot(x,y)このための滑らかな関数を示しています。
pylab.plot(x,y)
x-Valueを取得する方法はありますy=3か?
y=3
よろしく
これで使えるはずですnumpy.interp。
numpy.interp
例えば:
numpy.interp(3.,y,x) #1.5
y 値が単調であるため、これは機能することに注意してください。y 値が単調でない場合、y->x のマッピングが一意であるという保証はありません。