def newton_ang_func(L_val,c2,m):
L = L_val
slope = (m*(m+1)+c2-L)/(m+1)/2.
z0 = [1+step*slope,slope]
z = odeint(f,z0,x_ang,args=(c2,L,m))
temp=1-pow(x_ang,2.0)
temp=pow(temp,m/2.)
zz=temp*z[:,0]
first_zz = np.array([1])
zz=np.append(first_zz, zz)
sloper = -(m*(m+1)+c2-L)/(m+1)/2.
z0r = [1-step*sloper,sloper]
zr = odeint(f,z0r,x_angr,args=(c2,L,m))
zzr=temp*zr[:,0]
zzr=np.append(first_zz, zzr)
return z[:,1][-1]
评论列表
文章目录