1 function ip = c_inner_product(w, a, b, v1, v2)
3 ## The usual inner product defined on the space of continuous
4 ## functions over the interval [a,b].
8 ## * ``w`` -- The weight function.
10 ## * ``a`` -- The left endpoint of the interval.
12 ## * ``b`` -- The right endpoint of the interval.
14 ## * ``v1`` -- The first vector.
16 ## * ``v2`` -- The second vector.
20 ## The inner product <v1, v2>.
22 integrand = @(x) w(x)*v1(x)*v2(x);
23 ip = quad(integrand, a, b);