什么是“z0”在这里? [英] What's "z0" in here?

查看:312
本文介绍了什么是“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 of fsolve()[^]: z0 is the initial guess for the root (zero point) of function f(z). print(z) outputs the root found by fsolve() and print(f(z)) outputs the value of the function at z (should be zero).


这篇关于什么是“z0”在这里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆