Message Boards Message Boards

0
|
3282 Views
|
6 Replies
|
1 Total Likes
View groups...
Share
Share this post:

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

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]
POSTED BY: Feras Awad
6 Replies

Thanks for your help.

POSTED BY: Feras Awad

Thank you for your help Your suggestion works well for me.

POSTED BY: Feras Awad

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:
POSTED BY: Andrija Graovac

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 BY: Daniel Lichtblau

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 BY: Feras Awad

It's not clear what the question is.

POSTED BY: Daniel Lichtblau
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