Add the Octave c_inner_product function.
authorMichael Orlitzky <michael@orlitzky.com>
Wed, 14 Nov 2012 22:27:04 +0000 (17:27 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Wed, 14 Nov 2012 22:27:04 +0000 (17:27 -0500)
c_inner_product.m [new file with mode: 0644]

diff --git a/c_inner_product.m b/c_inner_product.m
new file mode 100644 (file)
index 0000000..ca98008
--- /dev/null
@@ -0,0 +1,4 @@
+function ip = c_inner_product(w, a, b, v1, v2)
+  integrand = @(x) w(x)*v1(x)*v2(x)
+  ip = quad(integrand, a, b)
+end