Quantcast

Symbolic Math Package 2.5.0

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Symbolic Math Package 2.5.0

evansste
I've recently learned that the "solve" function has been fixed in Octave's latest symbolic math package; package 2.5.0.  This is according to the following link:

https://octave.sourceforge.io/symbolic/NEWS.html

It's mentioned in the sixth bullet that "solve" now works with inequalities.

I tried using the solve function in order to solve an equation (not an inequality), but it didn't work.  Before giving up, I wanted to verify if it's everyone's current understanding that the symbolic package doesn't solve equations.

When I type the following command, I get an error message stating that the equals sign is an invalid constant.  Here's the command that I type:

solve(2 = x + 1,x)

The error message reads:
   invalid constant left hand side of assignment
>>> solve(2 = x +1,x)
                   ^

Am I doing something wrong, or is this function still broken?

According to the above link, I'm using the latest package.  If I type "pkg list", it shows that symbolic 2.5.0 is installed.  Has anyone gotten the new symbolic package to solve an equation?  All of the posts that I've been able to find are old.  Just wanted to confirm before giving up.  Thanks.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Symbolic Math Package 2.5.0

Oliver Heimlich
Am 23. April 2017 00:42:12 MESZ schrieb evansste <[hidden email]>:

>I've recently learned that the "solve" function has been fixed in
>Octave's
>latest symbolic math package; package 2.5.0.  This is according to the
>following link:
>
>https://octave.sourceforge.io/symbolic/NEWS.html
>
>It's mentioned in the sixth bullet that "solve" now works with
>inequalities.
>
>I tried using the solve function in order to solve an equation (not an
>inequality), but it didn't work.  Before giving up, I wanted to verify
>if
>it's everyone's current understanding that the symbolic package doesn't
>solve equations.
>
>When I type the following command, I get an error message stating that
>the
>equals sign is an invalid constant.  Here's the command that I type:
>
>solve(2 = x + 1,x)
>
>The error message reads:
>   invalid constant left hand side of assignment
>>>> solve(2 = x +1,x)
>                   ^
>
>Am I doing something wrong, or is this function still broken?
>
>According to the above link, I'm using the latest package.  If I type
>"pkg
>list", it shows that symbolic 2.5.0 is installed.  Has anyone gotten
>the new
>symbolic package to solve an equation?  All of the posts that I've been
>able
>to find are old.  Just wanted to confirm before giving up.  Thanks.
>
>
>
>--
>View this message in context:
>http://octave.1599824.n4.nabble.com/Symbolic-Math-Package-2-5-0-tp4682975.html
>Sent from the Octave - Maintainers mailing list archive at Nabble.com.

Hi,

you have to use the equal operator == instead of the assignment operator = to make it work.

See here for some examples on how to use the solve function or use 'help @sym/solve' in Octave.

https://octave.sourceforge.io/symbolic/function/@sym/solve.html

Oliver

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Symbolic Math Package 2.5.0

evansste
Thanks so much, Oliver.  

You have no idea how much time and frustration you saved me with your answer.  The double equals sign is all it took.  Such a simple solution.

Prior to your response, I was already thinking of alternatives, in case I wouldn't be able to get it to work.  None of them were pretty, so thanks so much again!
Loading...