--- /dev/null
+function isUT = is_upper_triangular(A)
+ ## Returns true if ``A`` is upper triangular, false otherwise.
+ isUT = isequal(A, triu(A));
+end
--- /dev/null
+A = eye(5);
+unit_test_equals("eye(5) is upper-triangular", ...
+ true, ...
+ is_upper_triangular(A));
+
+A = [1, 2, 3; ...
+ 0, 4, 5; ...
+ 0, 0, 6];
+unit_test_equals("An upper-triangular matrix is upper-triangular", ...
+ true, ...
+ is_upper_triangular(A));
+
+
+unit_test_equals("A lower-triangular matrix is not upper-triangular", ...
+ false, ...
+ is_upper_triangular(A'));