在13个方程的系统中Sympy Nsolve误差

时间:2021-01-19 20:23:50

I set up fallowing code for system of 13 equations with 12 unknowns, however while code looks valid there is crash with fallowing error:

我为12个未知数的13个方程式系统设置了代码,但是当代码看起来有效时会出现以下错误:

File "C:\Python27\lib\site-packages\sympy\solvers\solvers.py
solve
x = findroot(f, x0, J=J, **kwargs)
File "C:\Python27\lib\site-packages\sympy\mpmath\calculus\op
ne 928, in findroot
fx = f(x0[0])
TypeError: <lambda>() takes exactly 12 arguments (1 given)

Code is following:

代码如下:

print nsolve((eq0,eq1,eq2,eq3,eq4,eq5,eq6,eq7,eq8,eq9,eq10,eq11,eq12), 
[Va,Vb,Vc,Vd,Ve,Vf,Fa,Fb,Fc,Fd,Fe,Ff], [1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,-1])

eq's are defined and each unknown is = Symbol(), any ideas?

eq是定义的,每个未知是= Symbol(),任何想法?

1 个解决方案

#1


0  

You have only 12 variables, but 13 points.

你只有12个变量,但有13个点。

#1


0  

You have only 12 variables, but 13 points.

你只有12个变量,但有13个点。