# Divide two dynamic values and write the answer in numerical form?

Posted 2 months ago
412 Views
|
6 Replies
|
1 Total Likes
|
 Consider the following code: x = 0; y = 0; a = Dynamic[x = x + 3]; b = Dynamic[y = y + 2]; I need to display the value of N[a/b] 
6 Replies
Sort By:
Posted 2 months ago
 It's not clear what the question is.
Posted 2 months ago
 I am sorry, I edit the post.When we define two dynamic values, say a and b as above, I need to express the operation a/b in numerical form, but N[a/b] does not work !I wondering to know how we can do this.
Posted 2 months ago
 Both a and b are expressions with head of Dynamic. Maybe you want to work directly with the values {x,y}? Could be done as follows. x = 0; y = 0; Dynamic[x = x + 3; y = y + 2; N[x*y]] I changed the division to multiplication so that changes in the value would be visible.
Posted 2 months ago
 Maybe something like this will be a littel help..inputmaxnumber[max_] := Manipulate[x, {x, 0, max, 3/2*00.1}] // N inputmaxnumber[100]And here you will just need to enter a max value of max as a number. Attachments: