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.
我想使用 Python 对数据数组执行数值拉普拉斯逆变换。
我在mpmath中找到了一个名为 invertlaplace 的算法,但是它只接受 lambda 函数。
您可以定义一个返回数据的插值版本的 lambda。
就像是:
from math import floor, ceil data = [1,2,3,4,5] interp = lambda x: (1 - x%1)*data[floor(x)] + (x%1)*data[ceil(x)]
我不确定线性插值对于您正在使用的逆拉普拉斯版本或您的数据是否稳定。