倍频dsolve SymPy错误:Python异常:AttributeError的:“名单”对象有没有属性“潜艇”
问题描述:
(我试过在Scientific Computing张贴这一点,但他们说,它张贴在这里,对不起,如果这又是题外话。)倍频dsolve SymPy错误:Python异常:AttributeError的:“名单”对象有没有属性“潜艇”
我第一次在Octave上使用dsolve(非常感谢包括这个功能,顺便说一句,这个SimPy连接非常好),它对大多数我尝试过的ODE和IVP都能正常工作,但是这个一个给我一个错误:
>> pkg load symbolic
>> syms x(t)
>> ode1 = diff(x,t) == -t/x
>> cond1 = x(0) == 5
>> dsolve(ode1, cond1)
error: Python exception: AttributeError: 'list' object has no attribute 'subs'
occurred at line 15 of the Python code block error: called from
python_cmd at line 176 column 5
dsolve at line 200 column 10
只是解决ODE工作正常;
>> dsolve(ode1)
ans =
{
(sym)
_________
╱ 2
x(t) = -╲╱ C₁ - t
(sym)
_________
╱ 2
x(t) = ╲╱ C₁ - t
我试过其他的初始条件,但得到了同样的错误:
>> cond2 = x(-3) == 0.1
warning: Using rat() heuristics for double-precision input (is this what you wanted?)
warning: called from
sym at line 225 column 7
binop_helper at line 60 column 5
ineq_helper at line 35 column 5
eq at line 91 column 5
cond2 = (sym) x(-3) = 1/10
>> dsolve(ode1, cond2)
error: Python exception: AttributeError: 'list' object has no attribute 'subs'
occurred at line 15 of the Python code block
error: called from
python_cmd at line 176 column 5
dsolve at line 200 column 10
任何人都可以在这方面帮助它仅与IVP崩溃?我真的很喜欢用八度来解决常微分方程和初值问题明确
答
答案很简单:
不幸的是,它还不支持。
越长越答:
我遇到了同样的问题,一看里面的脚本,看看发生了什么事情错了。
在dsolve.m功能的174线,你会发现以下内容:
% FIXME: it is not currently supported a list of boundary/initial conditions
你可以做什么:
如果你真的需要的话,我会建议您与作者的软件包,并让他们知道实际上有人想要这个功能。访问Forge页面查看软件包作者的详细信息。
(这里是旧的文章http://scicomp.stackexchange.com/questions/26464/dsolve-sympy-error-python-exception-attributeerror-list-object-has-no-attri) –