Fourier package?



>>>>> "Daniel" == Daniel Lakeland <dlakelan at street-artists.org> writes:

    Daniel> On Thu, Jan 04, 2007 at 05:14:25PM -0500, Raymond Toy wrote:
    >> Daniel Lakeland wrote:
    >> > I'm confused by the documentation for the fourier package. In the
    >> > following:
    >> >
    >> > Function: fourier (f, x, p)
    >> >
    >> >     Returns a list of the Fourier coefficients of f(x) defined on the interval [-%pi, %pi].
    >> >
    >> > what is the role of "p" ???

    >> From a brief look at the code, it seems that p is used to indicate the 
    >> interval [-p, p].  I think the documentation is wrong about the interval 
    >> being -%pi to %pi.

    Daniel> That's what I suspected from playing around with it. Perhaps someone
    Daniel> else can confirm, and if so, we can change the docs.

I think it's also unfortunate the fourexpand and friends need you to
specify p again.  I would have expected fourier to leave enough info
around to know the interval.

I was getting confused for a while when I was doing
e:fourier(f,x,10); plot2d(fourexpand(e,x,1,5),[x,-10,10]).

But maybe the intent is that you should be able to compute the Fourier
series with a period of p, but expand the series with a different
period. 

Ray