On 10/28/07, Peter Danenberg <pcd at wikitex.org> wrote:
> It works; but I'd rather employ the builtin `gramschmidt', if only I
> could break the assumption that inner product = dot-product.
>
> Eigen.mac seemed to imply that redefining `innerproduct' might work;
> but no avail.
The following works for me.
load (eigen);
innerproduct (f, g) := integrate (f * g, 'x, a, b);
gramschmidt ([1, sin(x), cos(x)]), a = -%pi/2, b = %pi/2;
=> [1, sin(x), (%pi*cos(x) - 2)/%pi]
Dunno what you might have done differently; did you define
innerproduct and then load eigen.mac? If so your definition was
clobbered.
Now that you mention it, an optional argument for gramschmidt,
to supply the inner production function, would be helpful.
HTH
Robert Dodier