X-Git-Url: http://gitweb.michael.orlitzky.com/?p=octave.git;a=blobdiff_plain;f=c_inner_product.m;h=b53deef48adeba65439e81961ddf865dce4d7e60;hp=1d7bfd1e67122823724ebafb8ee919fe58c9980e;hb=99b1398f7acd8c15e42160c047dcaff816643020;hpb=6f4b337984a4abff81123a14496a59f9f4a0351d diff --git a/c_inner_product.m b/c_inner_product.m index 1d7bfd1..b53deef 100644 --- a/c_inner_product.m +++ b/c_inner_product.m @@ -1,24 +1,24 @@ function ip = c_inner_product(w, a, b, v1, v2) - ## - ## The usual inner product defined on the space of continuous - ## functions over the interval [a,b]. - ## - ## INPUT: - ## - ## * ``w`` -- The weight function. - ## - ## * ``a`` -- The left endpoint of the interval. - ## - ## * ``b`` -- The right endpoint of the interval. - ## - ## * ``v1`` -- The first vector. - ## - ## * ``v2`` -- The second vector. - ## - ## OUTPUT: - ## - ## The inner product . - ## + % + % The usual inner product defined on the space of continuous + % functions over the interval [a,b]. + % + % INPUT: + % + % * ``w`` -- The weight function. + % + % * ``a`` -- The left endpoint of the interval. + % + % * ``b`` -- The right endpoint of the interval. + % + % * ``v1`` -- The first vector. + % + % * ``v2`` -- The second vector. + % + % OUTPUT: + % + % The inner product . + % integrand = @(x) w(x)*v1(x)*v2(x); ip = quad(integrand, a, b); end