plotting qC and better way for IIC

*To*: mathgroup at smc.vnet.net*Subject*: [mg130332] plotting qC and better way for IIC*From*: debguy <johnandsara2 at cox.net>*Date*: Wed, 3 Apr 2013 04:10:42 -0400 (EDT)*Delivered-to*: l-mathgroup@mail-archive0.wolfram.com*Delivered-to*: l-mathgroup@wolfram.com*Delivered-to*: mathgroup-newout@smc.vnet.net*Delivered-to*: mathgroup-newsend@smc.vnet.net

Herman T wrote: > Dear Sir, > > I'm interested in plotting the functions qC, IIC but couldn't find away > to plot the functions. so any help would be greatly appreciated. > I looked at it. I have Mathematica 4.0 so could not see the last plot you did (the same way). And I don't have Log2 either so bear with me. Being that you did plots I'm unsure of the question. But I see this: (note to others: q is sinusoidal like "Plot[ Sin[t]+1..." and qC[2,4,.02,t] is a selected point on the sinusoidal; code far below) IIC [nu_, num_, Del_, t_] := Log[2, num] - Sum[ Log[2, (qt = qC[nu, num, Del, t])Log[2, qt], {t, 0, num - 1}]]; I had two problems. (1) you have Log2[ expr, {t,0,num-1} ] inside Sum[] and I can't see that working unless you meant to use Sum [ Table[ expr, {t,0,num-1} ] ] (2) you use t as parameter to IIC but also use {t,0,num-1}. use {tt,0,num-1} to avoid confusion (3) because of this it's unclear whether you mean to to use t or tt as parameter in qC In the below I've re-expressed IIC but it is only one possible resulting expr considering my uncertainty above. IIC [nu_, num_, Del_, t_] := Log[2, num] - Sum[ Log[2, qC[nu, num, Del, t]Log[2, qC[nu, num, Del, t]] ] , {tt, 0, num - 1}] ] ]; However the output for the above includes imaginaries and I'm unsure if that's intentional (you many be wishing to plot phasors using imaginaries as a "convenient" pseudo indicator, i don't know). I do know some physics and electrical engineering but am rusty and am avoiding figuring out the applied meaning of the equations your using for correctness. Describe eq'n fully if you wish more comments. I'm sure theres' plenty of ways to plot phasors in mm but it's not a question as yet. Bye the way, there are circuit simulator programs that can show these (ie, qucs(1) ). There is a Mathematica package for circuit simulation too. Given simple circuits these can graph ie the waves of a capacitor dumping over time. (I'm sure professionally there are more such software and databases of parts and specs I was never able to see). You may wish to try that end of things. ------------------------------------------------ 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}]) Plot[q[2.0, 4.0, 0.2, t], {t, 0, 15}] 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}]) ListPlot[Table[{t, qC[2, 4, 0.2, t]}, {t, 0, 8}]] IIC [\[Nu]_, num_, \[CapitalDelta]_, t_] := Log2[num] - Sum[ Log2[(qt = qC[\[Nu], num, \[CapitalDelta], t])Log2[qt], {t, 0, num - 1}]]; ListPlot[Table[{\[Nu], IIC[\[Nu], 4, 0.2]}, {\[Nu], 1, 200}], PlotRange -> All] (question was howto (best) plot IIC)