X-Git-Url: http://gitweb.michael.orlitzky.com/?p=octave.git;a=blobdiff_plain;f=tests%2Fperturb_tests.m;fp=tests%2Fperturb_tests.m;h=f683336c7f5bfc37d4bac38a89d31d138f956e86;hp=0000000000000000000000000000000000000000;hb=79f2b66bf6273f0f761d414613c69873aba0307b;hpb=92116b34e755b3ef5de14a1777676bc09180f007 diff --git a/tests/perturb_tests.m b/tests/perturb_tests.m new file mode 100644 index 0000000..f683336 --- /dev/null +++ b/tests/perturb_tests.m @@ -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'));