From 175721a63b426355274fa9e8063f762020ab8362 Mon Sep 17 00:00:00 2001 From: RossTheRoss Date: Thu, 30 Jan 2020 16:55:04 -0600 Subject: R E A R R A N G E --- OLD/math2373/lab6/approx.m | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 OLD/math2373/lab6/approx.m (limited to 'OLD/math2373/lab6/approx.m') diff --git a/OLD/math2373/lab6/approx.m b/OLD/math2373/lab6/approx.m new file mode 100644 index 0000000..8fb87f2 --- /dev/null +++ b/OLD/math2373/lab6/approx.m @@ -0,0 +1,6 @@ +z=8-2*2-7*exp(-2/2);%exact solution at t=2 +for k=1:5 + N=5*2^(k-1);eulerN; + %difference between Euler approximation and exact solution at t=2. + error(k)=y(N+1)-z; +end \ No newline at end of file -- cgit v1.2.3