## Documentation Center |

Show assumptions set on symbolic variable

Show the assumptions set on variables `n` and `x` separately,
and then show assumptions set on all variables.

Assume that the variable `n` is integer and
the variable `x` is rational. In addition to that
, assume that the product `n*x` belongs to the interval
from `-100` to `100`:

syms n x assume(n,'integer') assume(x,'rational') assumeAlso(-100 <= n*x <= 100)

To see the assumptions set on the variable `n`,
enter:

assumptions(n)

ans = [ -100 <= n*x, n*x <= 100, n in Z_]

To see the assumptions set on the variable `x`,
enter:

assumptions(x)

ans = [ -100 <= n*x, n*x <= 100, x in Q_]

To see the assumptions set on all variables, use `assumptions` without
any arguments:

assumptions

ans = [ -100 <= n*x, n*x <= 100, n in Z_, x in Q_]

For further computations, clear the assumptions:

syms n x clear

Show the assumptions set by using `syms` and `assume`.

Use `assumptions` to return all assumptions,
including those set by the `syms` command:

syms x real assumeAlso(x < 0) assumptions(x)

ans = [ x < 0, x in R_]

`and` | `assume` | `assumeAlso` | `clear` | `clear
all` | `isAlways` | `logical` | `not` | `or` | `sym` | `syms`

Was this topic helpful?