Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: capacitor equation solution not working

  • To: mathgroup at smc.vnet.net
  • Subject: [mg119708] Re: capacitor equation solution not working
  • From: Dana DeLouis <dana.del at gmail.com>
  • Date: Sat, 18 Jun 2011 06:20:48 -0400 (EDT)

.. I[t_]:= If[t<10||t>60,0,1]

As a side note, for a pulse, perhaps one of these two alternatives.

f[t_]:=UnitStep[t-10] - UnitStep[t-60]
f[t_]:=UnitStep[ -(t-10) (t-60)]

= = = = = = = = = =
HTH  : >)
Dana DeLouis


On Jun 17, 12:09 am, "J and B" <noslow... at comcast.net> wrote:
> I am trying to solve a very simple circuit, one that has only a capacitor in
> it.  What am I doing wrong?  The final graph should show that the capacitor
> has discharged, but its staying constant.  I have current starting at t=10
> and ending at t=60. 
> I hope I have used the correct way to put in my code, I am using a new
> computer and I having trouble with my email program.  Any advice would be
> appreciated.
>
> Thanks
>
> My code.
> I[t_]:= If[t<10||t>60,0,1]
> Plot[i[t],{t,0,100}]
> Eq=v'[t]==i[t]/c
> c=1;
> Soleq==v[t]/.NDSolve[{eq,v[0]==0},v[t],{t,0,100}],[[1]]
> Plot[soleq,{t,0,100}]



  • Prev by Date: Re: How to Do a Replacement with Two Conditions
  • Next by Date: Re: capacitor equation solution not working
  • Previous by thread: Re: capacitor equation solution not working
  • Next by thread: Re: capacitor equation solution not working