Changes

Jump to navigation Jump to search

Interval package

1,455 bytes added, 03:55, 30 October 2014
Interval vectors and matrices
octave:17> infsup ("-42??u")
ans = [-42, +Inf]
 
==== Interval vectors and matrices ====
Vectors and matrices of intervals can be created by passing numerical matrices, char vectors or cell arrays to the <code>infsup</code> constructor. With cell arrays it is also possible to mix several types of boundaries.
octave:18> M = infsup (magic (3))
M = 3×3 interval matrix
[8] [1] [6]
[3] [5] [7]
[4] [9] [2]
octave:19> infsup (magic (3), magic (3) + 1)
ans = 3×3 interval matrix
[8, 9] [1, 2] [6, 7]
[3, 4] [5, 6] [7, 8]
[4, 5] [9, 10] [2, 3]
octave:20> infsup (["0.1"; "0.2"; "0.3"; "0.4"; "0.5"])
ans ⊂ 5×1 interval vector
[.09999999999999999, .10000000000000001]
[.19999999999999998, .20000000000000002]
[.29999999999999998, .30000000000000005]
[.39999999999999996, .40000000000000003]
[.5]
octave:21> infsup ({1, eps; "4/7", "pi"}, {2, 1; "e", "0xff"})
ans ⊂ 2×2 interval matrix
[1, 2] [2.220446049250313e-16, 1]
[.5714285714285713, 2.7182818284590456] [3.1415926535897931, 255]
 
When matrices are resized using subscripted assignment, any implicit new matrix elements will carry an empty interval.
octave:22> M (4, 4) = 42
M = 4×4 interval matrix
[8] [1] [6] [Empty]
[3] [5] [7] [Empty]
[4] [9] [2] [Empty]
[Empty] [Empty] [Empty] [42]
=== Decorations ===
240

edits

Navigation menu