aboutsummaryrefslogtreecommitdiffstats
path: root/Part 1/error_script.m
diff options
context:
space:
mode:
Diffstat (limited to 'Part 1/error_script.m')
-rw-r--r--Part 1/error_script.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/Part 1/error_script.m b/Part 1/error_script.m
index f9f8a5d..98ca943 100644
--- a/Part 1/error_script.m
+++ b/Part 1/error_script.m
@@ -57,7 +57,7 @@ i_Exact = @(t) (6/L)*((2*pi)/T * sin((2*pi)/T*t) + (R/L)*cos((2*pi)/T*t) - (R/L)
exact = vin(t) - R*i_Exact(t);
%error as a function of t
-error(t) = abs(exact(t) - vout(t));
+error = abs(exact - vout);
figure(3);
plot(t,error); %for ralston