| Author |
Comment/Response |
Toen
|
10/02/10 08:19am
g'day,
x0 = Sin[Pi/3 k];
x12 = Cos[Pi/4 k];
Sum[Binomial[12, k] x0 x12, {k, 0, 12}]
seems to do the trick, with example functions inserted into definitions of x0, x12.
Or you could treat x0 and x12 as functions of k:
Clear[x0, x12];
x0[k_] := Sin[Pi/3 k];
x12[k_] := Cos[Pi/4 k];
Sum[Binomial[12, k] x0[k] x12[k], {k, 0, 12}]
And if x0 and x12 only matter in the immediate context of this evaluation, you can define them locally:
Module[{x0, y0},
x0[k_] := k!;
x12[k_] := 2^-k;
Sum[Binomial[12, k] x0[k] x12[k], {k, 0, 12}]]
Note that this ignores any other definition of x0 and x12, and if you ran either of the top two code snippets first then x0 and x12 would still be defined as previously.
cheers,
toen
URL: , |
|