背景
我有一個這樣的指數方程:
a - b * np.exp(-c/x) - y * np.exp(-delta/x).sum() * 2
其中 a、b 和 c 是常量,增量是一個一維陣列,可從
這是具有較低 vmax 的相同資料:
m = ax.pcolormesh(X, Y, (res**2).T, cmap='viridis', vmax=2e3)

uj5u.com熱心網友回復:
您的方程式如下所示:
a - b * np.exp(-c/x) - y * np.exp(-delta/x).sum() * 2 = 0
也就是說:
y = (a - b * np.exp(-c/x)) / np.exp(-delta/x).sum() / 2
您可以插入任何值x并獲得相應的y:
>>> import numpy as np; import matplotlib.pyplot as plt
>>> a,b,c = 35167.7, 11919.5, 1.68
>>> delta = np.load('delta.npy')
>>> def the_y(x): return (a - b * np.exp(-c/x)) / np.exp(-delta/x).sum() / 2
...
>>> import matplotlib.pyplot as plt
>>> X = np.linspace(1, 24, 1000)
>>> plt.plot(X, [the_y(x) for x in X]); plt.show()
這是情節:

確實,對于每一個我x都X = np.linspace(1, 24, 1000)得到了相應的y值。你可以生成無數個xs 并得到無數個ys 作為回應,所以我想說有無限多的解決方案。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/464868.html
上一篇:Sagemath:有沒有一種簡單的方法來分解C上的多項式并讓根以根式而不是小數形式出現?
下一篇:如何將線條轉換為旋轉的矩形?
