AttributeError:MutableDenseMatrix

时间:2016-04-19 11:37:20

标签: matlab python-2.7 octave sympy

我正在尝试解决一个由6个方程组成的系统。 每个方程都是多变量的,除了一个,我想用数字方法解析系统。 我使用八度音程来做到这一点,但语法与用于matlab的语法相同(据我所知)。 这是我的代码:

syms x y z u v w
eqn1 = (x*exp((4*y*0.247+u)/(8.6173324*10E-5*300)))/(1-x)==exp(-0.259/(8.6173324*10E-5*300)) ;
eqn2 = (y*exp((3*x*0.247+3*y*0.220+u)/(8.6173324*10E-5*300)))/(1-y)==exp(0.245/(8.6173324*10E-5*300)) ;
eqn3 = (z*exp((3*x*-0.017+u)/(8.6173324*10E-5*300)))/(z-1)==exp(0.050/(8.6173324*10E-5*300)) ;
eqn4 = 5*10E-7*exp(-u/(8.6173324*10E-5*T))/(1-5*10E-7(1,j))==1 ;
eqn5=v-x-y-z==0.00444737016
eqn6=w-x-y-z==5*10E-7
S=solve([eqn1,eqn2,eqn3,eqn4,eqn5,eqn6],[x,y,z,u,v,w])

结果是:

[...]
warning: Using rat() heuristics for double-precision input (is this what you wanted?)
eqn5 = (sym)

                 27
v - x - y - z = ────
                6071

warning: Using rat() heuristics for double-precision input (is this what you wanted?)
Traceback (most recent call last):
File "<stdin>", line 26, in <module>
File "<stdin>", line 6, in _fcn
File "/usr/lib/python2.7/dist-packages/sympy/matrices/matrices.py", line 3084, in __getattr__
"%s has no attribute %s." % (self.__class__.__name__, attr))
AttributeError: MutableDenseMatrix has no attribute is_Relational.

eqn6 = (sym) w - x - y - z = 1/200000
PYTHON: Error in cmd
Resetting the octsympy communication mechanism
Closing the Python pipe...
error: python_cmd: unexpected return
error: called from
python_cmd at line 143 column 6
solve at line 135 column 9
test at line 34 column 2

我不知道要修复它需要做些什么。有什么建议?你已经遇到过这个问题吗? 祝福,

马修

0 个答案:

没有答案