2024-11-057.7 g(x)=(10a)/(10b+(a-10b)e^(asinx)),取a=1.1,b=0.01,计算x=1,2,...,20时,g(x)对应的函数值,把这样得到的数据作为模拟观测值,记作(xiimportnumpyasnpimportmatplotlib.pyplotaspltfromscipy.optimizeimportcurve_fit,leastsq,least_squaresfromscipy.constantsimportedefg(x,a,b):return(10*a)/(10*b+(a-10*b)*np.exp(a*np.sin(x)))a=1.1b=0.01x_values=np.