summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasil Zlatanov <v@skozl.com>2017-02-20 15:06:24 +0000
committerVasil Zlatanov <v@skozl.com>2017-02-20 15:06:24 +0000
commitf374fbf663a27d6a78c8fda6f160d39d4945e82c (patch)
tree4f30bfd61523f0ce9cdde7cb6d15b8cb1a91126f
parentabcd65d98b8a4830673d53eaa9665ad195b70b03 (diff)
downloade2-matlab-f374fbf663a27d6a78c8fda6f160d39d4945e82c.tar.gz
e2-matlab-f374fbf663a27d6a78c8fda6f160d39d4945e82c.tar.bz2
e2-matlab-f374fbf663a27d6a78c8fda6f160d39d4945e82c.zip
Exact solution hint
-rw-r--r--coursework17/ralston.m1
1 files changed, 1 insertions, 0 deletions
diff --git a/coursework17/ralston.m b/coursework17/ralston.m
index d910442..7ed4ad3 100644
--- a/coursework17/ralston.m
+++ b/coursework17/ralston.m
@@ -10,6 +10,7 @@ function [time_array, Vout_array] = ralston(R, L, Vin, current_initial, step, t_
% Given the input voltage as a function of time we can express
% dI/dt (dcurrent_dt) as a function of time as well (given R and L)
+ % NOTE we can use the integrating factor to find exact solution
dcurrent_dt = @(t, I) (Vin(t) - I*R)/L;
% Loop as many times as step allows and: