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

MathGroup Archive 2010

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

Search the Archive

manipulate time

  • To: mathgroup at smc.vnet.net
  • Subject: [mg114748] manipulate time
  • From: manel zerelli <manel.zerelli at gmail.com>
  • Date: Wed, 15 Dec 2010 07:52:07 -0500 (EST)

i want to solve two differential equations in which a parameter "r"
vary in an intervall. for that i want to see the effect of this
variation at each time.i want to manipulate time and for each instant
i scan all the interval of variation of parameter "r".
i tried this:

Manipulate[
For[r = 1, r < 4, r++,
sol = DSolve[{\[Theta]'[t] == k i[t],
i'[t] == -k \[Theta][t] - r i[t] + 10,
i[0] == 0, \[Theta][0] == 0}, {i, \[Theta]}, t];
ParametricPlot[Evaluate[{i[t], \[Theta][t]} /. sol], {t, 0, n},
PlotRange -> {{-10, 10}, {-1, 15}}]], {n, 0, 7}]

and i tried tu use two for loop

For [t = 0.1, t < 7, t++,
For[r = 1, r < 3, r++,
sol = DSolve[{\[Theta]'[t] == k i[t],
i'[t] == -k \[Theta][t] - r i[t] + 10,
i[0] == 0, \[Theta][0] == 0}, {i, \[Theta]}, t];
ParametricPlot[Evaluate[{i[t], \[Theta][t]} /. sol], {t, 0.1, 7},
PlotRange -> {{-10, 10}, {-1, 15}}]]]

i am a new user of mathematica so i am sorry for the syntax error!
can you help me o solve this problem


  • Prev by Date: Plotting anomaly with a staircase function
  • Next by Date: Maximum optimization problem
  • Previous by thread: Re: Plotting anomaly with a staircase function
  • Next by thread: Re: manipulate time