From: Michael Orlitzky Date: Wed, 14 Nov 2012 22:27:04 +0000 (-0500) Subject: Add the Octave c_inner_product function. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=0e3046e87797f5bdcc009765ee8b327e72413100;p=octave.git Add the Octave c_inner_product function. --- diff --git a/c_inner_product.m b/c_inner_product.m new file mode 100644 index 0000000..ca98008 --- /dev/null +++ b/c_inner_product.m @@ -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