subexpressions (fourier example)

Steve Howell showell30 at
Sat Jun 2 17:47:45 CEST 2007

--- Steve Howell <showell30 at> wrote:

> --- Stef Mientki <S.Mientki-nospam at>
> wrote:
> > Maybe he meant
> >    sin(x)^2 + cos(x)^2
> > which is well known demodulation technique if you
> > create two signals 90 degrees out of phase.
> > 

A more realistic subexpression where you might repeat

lambda t: a[0]/2 + sum(a[n]*cos(n*f*t) +
b[n]*sin(n*f*t) \
    for n in range(1,101))

Granted it's not the best style to cram it in a
lambda, but I think some folks might prefer the

You snooze, you lose. Get messages ASAP with AutoCheck
in the all-new Yahoo! Mail Beta.

More information about the Python-list mailing list