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

Posted 5 months ago
630 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] Answer
6 Replies
Sort By:
Posted 5 months ago
 It's not clear what the question is. Answer
Posted 5 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. Answer
Posted 5 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. Answer
Posted 5 months ago Answer
 Maybe something like this will be a littel help..inputmaxnumber[max_] := Manipulate[x, {x, 0, max, 3/2*00.1}] // N inputmaxnumberAnd here you will just need to enter a max value of max as a number. Attachments: Answer Answer