assumptions

Lists the assumptions set on symbolic variables.

Category: Mathematics > Assumptions

Syntax

a = assumptions

Returns all assumptions on all symbolic variables.

a = assumptions(x)

Returns only the assumptions on x.

assumptions('clear')

Clears all assumptions.

Description

Use it to check what has been declared with assume and assumeAlso, because assumptions persist in the session and can change results far from where they were set. Conditions of the form in(x, 'real') mean that x belongs to that set.

Input arguments

x
Symbolic variable, or an array of them.

Output arguments

a
Symbolic array of conditions. It is empty when nothing was assumed.

Example

Read back

syms x
assume(x, 'real')
assumptions(x)
assumptions('clear')
assumptions
Output
ans = in(x, 'real')
ans = 
Empty sym: 1-by-0
ans = in(x, 'real')

See also

assume assumeAlso syms sym