Convert constant subexpressions to intervals
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.
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 + PI*x^2/sin(1) + 1/4)
interval(f(g(2 + x) + sin(1)*sqrt(PI)))
interval(CATALAN), interval(EULER), interval(PI)