X-Git-Url: http://gitweb.michael.orlitzky.com/?p=octave.git;a=blobdiff_plain;f=c_inner_product.m;fp=c_inner_product.m;h=ca98008acb9228ed932fe9be95ee5d070a771803;hp=0000000000000000000000000000000000000000;hb=0e3046e87797f5bdcc009765ee8b327e72413100;hpb=ee06b882dfb9a86788d7057cec8ca6d7680c5ca5 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