Dynamic Solution for Variable Slider in Mathematica 7 with Cosine Function

  • Context: Mathematica 
  • Thread starter Thread starter button_ger
  • Start date Start date
  • Tags Tags
    Mathematica
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
3 replies · 2K views
button_ger
Messages
10
Reaction score
0
hey.

How can I realize a dynamic solution?

The first variable slider should be simply d and the second a Cos [x degrees]?


Slider[Dynamic[angle], {0., 90.} Degree]
Slider[Dynamic[distance], {0, 1000.}]
Dynamic[distance]/ Cos[Dynamic[angle] ]

... does not work.
The solution will give
830. Sec[1.428] for example.

How can I solve the problem?
 
Physics news on Phys.org
Great. This solved my problem. Thanks a lot.

But now I have an analogical problem.
When I use "solution = Dynamic[distance/Cos[angle]]" I cannot use solution in the next line dynamicaly like

solution2 = solution * 2

How can I do this?
 
Dynamic[solution=distance/Cos[angle]]

I wish I could give you an explanation why, but I honestly don't understand the details of Dynamic.