Add lab session 7
Handed in on Jan 24.
Change-Id: I9e804d3f114e175887847cc737ad71d316081a45
diff --git a/p7/numericalintegration/main.m b/p7/numericalintegration/main.m
new file mode 100644
index 0000000..cb8aa76
--- /dev/null
+++ b/p7/numericalintegration/main.m
@@ -0,0 +1,12 @@
+M = dlmread('../data/refredant_integration.dat');
+
+d = @(t) (1.370e-06*t^2 + 1.217e-04*t -2.173e+00);
+
+x = M(:, 1);
+y = M(:, 2);
+
+for i = 1:size(y, 1)
+ y(i) = y(i) - d(x(i));
+end
+
+trapz(x, y)
diff --git a/p7/numericalintegration/main2.m b/p7/numericalintegration/main2.m
new file mode 100644
index 0000000..b4ff19f
--- /dev/null
+++ b/p7/numericalintegration/main2.m
@@ -0,0 +1,12 @@
+M = dlmread('../data/escalfant_integration.dat');
+
+d = @(t) (4.053e-08*t^2 + 9.445e-06*t + 5.368e-01);
+
+x = M(:, 1);
+y = M(:, 2);
+
+for i = 1:size(y, 1)
+ y(i) = y(i) - d(x(i));
+end
+
+trapz(x, y)