Documentation Center

  • Trial Software
  • Product Updates


Convert constant subexpressions to intervals

Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.




interval(object) converts all constant subexpressions of object to floating point intervals.

interval is the analogue of float. While the latter converts exact numbers and numerical expressions to floating-point approximations, interval converts numbers and numerical expressions to enclosing floating-point intervals.

If object is an arithmetical expression, interval(object) recursively descends into the subexpressions of object and replaces all integers,rationals, and floating point numbers as well as the constants CATALAN, EULER and PI by floating-point intervals enclosing them. Afterwards, the resulting expression is evaluated via interval arithmetic.

If object is not an arithmetical expression, interval returns the object unchanged.


Example 1

Only constant expressions such as numbers 1, , 0.123 + 4.5 i etc. and numerical expressions PI + sqrt(2), sin(PI/24) etc. are converted to floating-point intervals. Symbolic objects such as identifiers, indexed identifiers etc. are left untouched:

interval(4*x[1] + PI*x[2]^2/sin(1) + 1/4)

interval(f(g(2 + x) + sin(1)*sqrt(PI)))

Example 2

The special MuPAD® constants CATALAN, EULER and PI can be converted to an enclosing floating-point interval:

interval(CATALAN), interval(EULER), interval(PI)



An arbitrary MuPAD object

Return Values

MuPAD object

See Also

MuPAD Domains

MuPAD Functions

Was this topic helpful?