Thank you so much for the helpful comments. Now able to manage to plot all the functions.
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[2.0, 4.0, 0.2, t], {t, 0, 200}]
qC[\[Nu]_, num_, \[CapitalDelta]_, t_] :=
1/num (1 +
2 Exp[-\[Nu]] Sum[
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, 20}, {n, 0, 20}]);
AbsoluteTiming[Table[qC[2., 4., 0.2, t], {t, 0, 200, 10}]]
ListPlot[Table[{t, qC[2, 4, 0.2, t]}, {t, 0, 200}]]
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], 4, 0.2]}, {[Nu], 1, 50}], PlotRange -> All, AxesOrigin -> {0, 0}]
I
andN
are built-in symbols, so don't use as custom function or variable names. Please try to come up with a minimal (as short as possible) test case that demonstrates the problem you are having, and describe the problem and the question in detail. If you simply post a large body of code, saying that it doesn't work, but not explaining what you're trying to do and what went wrong, then it's unlikely people will help. $\endgroup$