aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsupercalvinchan <cc6815@ic.ac.uk>2017-03-13 13:05:53 +0000
committerGitHub <noreply@github.com>2017-03-13 13:05:53 +0000
commit55fa9d66cd8993b4e76122d3df4ef42685285770 (patch)
treed3bd08030885a15c59190c7a4229260cce1658fa
parent2ebe4bcbfd1b53169cec5c0035e7bed6570a96f4 (diff)
downloadNumericalAnalysis-55fa9d66cd8993b4e76122d3df4ef42685285770.tar.gz
NumericalAnalysis-55fa9d66cd8993b4e76122d3df4ef42685285770.zip
Update error_script_heun.m
-rw-r--r--Part 1/error_script_heun.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/Part 1/error_script_heun.m b/Part 1/error_script_heun.m
index 2aeae88..8c0f49f 100644
--- a/Part 1/error_script_heun.m
+++ b/Part 1/error_script_heun.m
@@ -18,7 +18,7 @@ func = @(t, iout) (vin(t) - iout*R) / L; % define func
vout = vin(t) - iout * R;
%obtaining the exact solution with favorite method
-i_{Exact} = g*(w*sin(w*t) + k*cos(w*t) - k*exp(-k*t))/(w^2 + k^2);
+i_{Exact} = (V_{initial_in}/L)*((2*pi)/T * sin((2*pi)/T*t) + (R/L)*cos((2*pi)/T*t) - (R/L)*exp(-(R/L)*t))/((2*pi)/T^2 + (R/L)^2);
exact = vin(t) - R*i_{Exact};
%error as a function of t
error= exact - vout;