什么是“z0”在这里? [英] What's "z0" in here?
本文介绍了什么是“z0”在这里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
from scipy.optimize import fsolve
def f(z):
x= z[0]
y= z[1]
return [x+2*y, x**2+y**2-1]
z0 = [0,1]
z = fsolve(f,z0)
print(z)
print(f(z))
和plz告诉我print之间的区别(z )& print(f(z))
我尝试过:
Plz帮助我
and plz tell me the difference between print(z) & print(f(z))
What I have tried:
Plz help me
from scipy.optimize import fsolve
def f(z):
x= z[0]
y= z[1]
return [x+2*y, x**2+y**2-1]
z0 = [0,1]
z = fsolve(f,z0)
print(z)
print(f(z))
和请告诉我print(z)& amp; print(f(z))
and plz tell me the difference between print(z) & print(f(z))
推荐答案
来自文档fsolve()
[ ^ ]:z0
是函数f(z)
的根(零点)的初始猜测。print(z)
输出fsolve()
找到的根和print(f(z) ))
在z
输出函数的值(应为零)。
From the documentation offsolve()
[^]:z0
is the initial guess for the root (zero point) of functionf(z)
.print(z)
outputs the root found byfsolve()
andprint(f(z))
outputs the value of the function atz
(should be zero).
这篇关于什么是“z0”在这里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文