Message Boards Message Boards

Solving for two variables in Manipulate[ ]

Posted 2 years ago

Hi, I would need to solve the equation for "s", keeping "s" also in the slider. This is "s" must not affect "t" Kindly please help. Thanks

Manipulate[
 Solve[
  0.20 == 0.266 - 0.032 s + 0.00077 t],
 {t, 10, 50, Appearance -> "Labeled"},
 {s, 2, 2.8, Appearance -> "Labeled"}]
POSTED BY: Ma noj
3 Replies
Posted 2 years ago

Thanks very much Mr. Hans, works wonderfully.

POSTED BY: Ma noj
Posted 2 years ago

Well, here is another:

Manipulate[
    Grid[{
        {"s(t):", First[sx /. Solve[0.20 == 0.266 - 0.032 sx + 0.00077 t, sx]]},
        {"t(s):", First[tx /. Solve[0.20 == 0.266 - 0.032 s + 0.00077 tx, tx]]}
    }],
    {t, 10, 50, Appearance -> "Labeled"},
    {s, 2.3, 3.3, Appearance -> "Labeled"}
 ]

enter image description here

Is this more like it?

POSTED BY: Hans Milton
Posted 2 years ago

Your question is a bit hard to understand, but are you looking for something like this below?

Manipulate[
    s = First@SolveValues[0.20 == 0.266 - 0.032 sx + 0.00077 t, sx],
    {t, 10, 50, Appearance -> "Labeled"},
    {s, 2.3, 3.3, Appearance -> "Labeled"}
 ]
POSTED BY: Hans Milton
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract