X-Git-Url: http://gitweb.michael.orlitzky.com/?p=octave.git;a=blobdiff_plain;f=tests%2Fforward_euler1_tests.m;fp=tests%2Fforward_euler1_tests.m;h=8bc337e65fabe28ac4c1245e1f9f7d134a1d11f2;hp=0000000000000000000000000000000000000000;hb=ef3085ef3c40eab925219bad1c6dbb2c6e106727;hpb=33e4dd7a64f35fb22774d59af11f5670ab566fbc diff --git a/tests/forward_euler1_tests.m b/tests/forward_euler1_tests.m new file mode 100644 index 0000000..8bc337e --- /dev/null +++ b/tests/forward_euler1_tests.m @@ -0,0 +1,10 @@ +f = @(x,y) y; +x0 = 0; +y0 = 1; +h = 1; +actual_y = forward_euler1(x0, y0, f, h); +expected_y = 2; + +unit_test_equals("Forward Euler works for one step", ... + expected_y, ... + actual_y);