Octave: assume() command in symbolic toolbox.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Octave: assume() command in symbolic toolbox.

cfrangos

(1) How is the assume() command applied in order to limit
a symbolic variable w to a real interval (a, b], for example,
(-pi/2, pi/2], [0, pi], (-pi, pi], etc?


(2) The documentation for the assume() command states that it
can be used as follows:

sym X = assume (X, COND1, COND2, …)

Some of the possible values for cond1, cond2, etc seem to be
'positive', 'negative', 'integer', 'real'.

What are all the other possible values?


Thanks very much.

Regards,
Constantine Frangos.

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Octave: assume() command in symbolic toolbox.

Colin Macdonald-2
On 25/01/17 08:53, Constantine Frangos wrote:
> (1) How is the assume() command applied in order to limit
> a symbolic variable w to a real interval (a, b], for example,
> (-pi/2, pi/2], [0, pi], (-pi, pi], etc?

Unfortunately, I don't know any way to do this at the moment.  If you're
using "solve", perhaps you can pass inequality constraints to it?

The symbolic package uses Sympy; here is a perhaps helpful thread about
this in Sympy:

http://stackoverflow.com/questions/19553652/sympy-limit-symbol-variable-to-interval

> (2) The documentation for the assume() command states that it
> can be used as follows:
>
> sym X = assume (X, COND1, COND2, …)
>
> Some of the possible values for cond1, cond2, etc seem to be
> 'positive', 'negative', 'integer', 'real'.
>
> What are all the other possible values?

See "help assumptions" and in particular:

 >> assumptions ('possible')

The upcoming 2.5.0 release will have many more options (but still no
general algebraic constraints).

best,
Colin

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave