Group Abstract Group Abstract

Message Boards Message Boards

0
|
6.1K Views
|
5 Replies
|
3 Total Likes
View groups...
Share
Share this post:

How Do I set a variable bigger than another variable?

POSTED BY: Stephan Jokiel
5 Replies

Double post my bad.

POSTED BY: Stephan Jokiel

Wolfram posted the code automatically in the here but thanks I I'll definitely give it a try :) if it works how I think it works it might even be better than the "If []"

POSTED BY: Stephan Jokiel

Hi Stephan,

you simply can let 'r' run from 0.00.. to 'a':

Manipulate[
 ParametricPlot[{v*
    t (1 + 1/(1 - r/a*Cos[w*t])), (r*Sin[w*t])/(1 - 
      r/a*Cos[w*t])}, {t, 0, 10}, 
  PlotRange -> {{-.5, 200}, {-100, 100}}], {{r, 1}, 0.000000001, a, 
  Appearance -> "Labeled"}, {{a, 2}, 0.000000001, 100, 
  Appearance -> "Labeled"}, {{v, 0.1}, 0.000000001, 20, 
  Appearance -> "Labeled"}, {{w, 2 Pi}, 0.000000001, 20, 
  Appearance -> "Labeled"}]

Also please note the way of initialization of the parameters which was probably inteded by you originally.

Yours Henrik

POSTED BY: Henrik Schachner

Wow, this is genius, thanks alot ;D enter image description here

POSTED BY: Stephan Jokiel

Hi,

You can use If[]:

Manipulate[
    If[
       r < a,
       ParametricPlot[
         {v*t (1 + 1/(1 - r/a*Cos[w*t])), (r*Sin[w*t])/(1 - r/a*Cos[w*t])},
         {t, 0, 10}, 
         PlotRange -> {{-.5, 200}, {-100, 100}}
       ],
       Graphics[Text["error :: r > a"]]
    ], 
    {r, 0.000000001, 100, Appearance -> "Labeled"},
    {a, 0.000000001, 100, Appearance -> "Labeled"},
    {v, 0.000000001, 20,  Appearance -> "Labeled"},
    {w, 0.000000001, 20,  Appearance -> "Labeled"}
]

I.M.

POSTED BY: Ivan Morozov
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard