Function: A = assumptions ()
Function: A = assumptions (x)
Function: [v, d] = assumptions (x, 'dict')
Function: L = assumptions ('possible')

List assumptions on symbolic variables.

The assumptions are returned as a cell-array of strings:

syms x y positive
syms n integer
assumptions
  ⇒ ans =
    {
      [1,1] = n: integer
      [1,2] = x: positive
      [1,3] = y: positive
    }
assumptions(n)
  ⇒ ans =
    {
      [1,1] = n: integer
    }

You can get the list of assumptions relevant to an expression:

f = sin(n*x);
assumptions(f)
  ⇒ ans =
    {
      [1,1] = n: integer
      [1,2] = x: positive
    }

With the optional second argument set to the string 'dict', return the assumption dictionaries in d corresponding to the variables in v.

You can also get a list of possible assumptions:

A = assumptions('possible');
strjoin(sort(A), ', ')
  ⇒ ans = ..., finite, ..., positive, ..., zero

See also: sym, syms, @sym/assume, @sym/assumeAlso.

Package: symbolic