[Python] curve fitting
๋ฐ์ด ์์ฐ์์ e์ธ ์ง์ํจ์ x = np.arange(-2, 4, 0.1) y = np.exp(x) plt.plot(x, y, label='e^x') plt.legend() plt.show() ์์ฐ๋ก๊ทธ ํจ์ x = np.arange(0.1, 4, 0.1) y = np.log(x) plt.plot(x, y, label='y = log x') plt.legend() plt.show() ์ง์ ํจ์ curve fitting from scipy.optimize import curve_fit import matplotlib.pyplot as plt # a*e^(-b*x)+c def func1(x, a, b, c): return a * np.exp(-b * x) + c def func2(x, a, b, c): ret..