]> gitweb.michael.orlitzky.com - octave.git/blobdiff - tests/perturb_tests.m
Add the perturb() function and its tests.
[octave.git] / tests / perturb_tests.m
diff --git a/tests/perturb_tests.m b/tests/perturb_tests.m
new file mode 100644 (file)
index 0000000..f683336
--- /dev/null
@@ -0,0 +1,7 @@
+A = rand(10);
+A_hat = perturb(A, 1e-12);
+dA = A_hat - A;
+
+unit_test_equals("dA has the correct infinity norm", ...
+                1e-12, ...
+                norm(dA, 'inf'));