Python surface fitting of variables of different dimensionto get unknown parameters?
问题 I have a function that includes x and y as independent variables and I want to fit the parameters to the data and function and plot a surface figure. I saw that if the variables have two different dimensions, I can use np.meshgrid(x,y) , but then how do I find the parameters a,b,c? My code looks like this: import matplotlib.pyplot as plt from scipy.optimize import curve_fit import numpy as np x = np.array([1,0.5,0.33,0.25,0.2]) y = np.array([1e-9,1e-8,1e-7,1e-6,1e-5,1e-4,1e-3,1e-2,1e-1,1e0