Re: Help with problems with symbolic package

[email protected]
Newsgroups gmane.comp.gnu.octave.general
Message-ID <[email protected]>
> So, at least I can work with the real variable, but I have to plot
> functions and so... Do you know how to solve this? And, about the
> SyntaxWarning, AFAIK, in Python 'a is b' is like the identity
> comparison... I think all the lines were it showed a warning would
> return false, as long as and object just created for the comparison
> and one stored as a variable are obviously not the same. But that
> might be a Python problem. I will check on my own, but please tell me
> if you know how to make the functions like 'fplot(symfun(syms))' work.
> 
> However, thanks a million for solving my first problem!

Well, I've corrected those errors in 'plot.py', and it seems they 
weren't crucial, because it continues having the same problem. I've 
checked for some syntax errors in the function, varying throw the 
different options that MatLab would give but that's neither the problem 
(it would be weird if so... It makes no sense that a syntax error for 
missing arguments gives that kind of exception 'isalnum'):

<--beggining of code-->

octave:1> pkg load symbolic
octave:2> syms x real
Symbolic pkg v2.9.0: 
/usr/lib/python3.8/site-packages/mpmath/ctx_mp_python.py:892: 
SyntaxWarning: "is" with a literal. Did you mean "=="?
   if other is 0:
/usr/lib/python3.8/site-packages/mpmath/ctx_mp_python.py:986: 
SyntaxWarning: "is" with a literal. Did you mean "=="?
   if other is 0:
/usr/lib/python3.8/site-packages/sympy/solvers/diophantine.py:3186: 
SyntaxWarning: "is" with a literal. Did you mean "=="?
   if feasible is 1:  # it's prime and k == 2
/usr/lib/python3.8/site-packages/mpmath/ctx_mp_python.py:892: 
SyntaxWarning: "is" with a literal. Did you mean "=="?
   if other is 0:
/usr/lib/python3.8/site-packages/mpmath/ctx_mp_python.py:986: 
SyntaxWarning: "is" with a literal. Did you mean "=="?
   if other is 0:
/usr/lib/python3.8/site-packages/sympy/solvers/diophantine.py:3186: 
SyntaxWarning: "is" with a literal. Did you mean "=="?
   if feasible is 1:  # it's prime and k == 2
Python communication link active, SymPy v1.4.
octave:3> f(x)=x^2
f(x) = (symfun)

    2
   x

octave:4> fplot(f)
error: isalnum: not defined for class
error: called from
     fplot at line 108 column 3
octave:5> fplot(f(x))
error: isalnum: not defined for class
error: called from
     fplot at line 108 column 3
octave:6> fplot(f(x),x)
error: isalnum: not defined for class
error: called from
     fplot at line 108 column 3

<--end of code-->

I've realize some mail clients might consider the '>>' from the Octave 
GUI line as an answer or cite, so I've did it through the CLI this time.
Please, any idea is welcome!

Happy hacking!
Darío
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.