Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: plotting an equation with double summations
Replies: 1   Last Post: Apr 3, 2013 5:55 AM

 Messages: [ Previous | Next ]
 Herman Posts: 40 Registered: 11/2/11
plotting an equation with double summations
Posted: Mar 26, 2013 12:45 PM

Remove[q, qC, IIC]

ass = {d > 1, num > 0, \[CapitalDelta] > 0, t > 0, n >= 0};

q[\[Nu]_, num_, \[CapitalDelta]_, t_] :=
1/num (1 +
2 Exp[-\[Nu]] NSum[
Sin[(\[Pi] d)/num]/((\[Pi] d)/num) Exp[-d \[CapitalDelta]^2]
Cos[(\[Pi] d)/num (2 t + 1)] \[Nu]^(n + d/2)/Sqrt[
n! (n + d)!], {d, 1, 10}, {n, 0, 10}])

AbsoluteTiming[Table[q[2, 4, 0.2, t], {t, 0, 200, 20}]]

Plot[{q[1.0, 4.0, 0.2, t], q[3.0, 4.0, 0.2, t],
q[6.0, 4.0, 0.2, t]}, {t, 2, 6}]

IIC[\[Nu]_, num_, \[CapitalDelta]_] :=
Log[2, num] -
Sum[(q[\[Nu], num, \[CapitalDelta], t]) Log[2,
q[\[Nu], num, \[CapitalDelta], t]], {t, 0, num - 1}];

AbsoluteTiming[Table[IIC[\[Nu], 4, 0.2], {\[Nu], 1, 200, 20}]]

ListPlot[Table[{\[Nu], IIC[\[Nu], 100, 0.2]}, {\[Nu], 1, 100}],
PlotRange -> All, AxesOrigin -> {0, 0}]

-5 down vote favorite
1

Thank you so much for the helpful comments. Now able to manage to plot all the functions.

Date Subject Author
4/3/13 Herman
4/3/13 Herman