Message Boards Message Boards

GROUPS:

[✓] Dynamically change the value of a variable in text mode?

Posted 11 months ago
1130 Views
|
2 Replies
|
1 Total Likes
|

Hello

I don't know if the title of the question reflects what I need so please feel free to change it (if possible).
I am writing a notebook with lots of texts (command 7) in which I explain how I have come up with a solution to a problem. In one of text parts I wrote

In order to calculate the frequency, I need to know that value of zeta. For zeta=VALUE, the frequency is VALUE.

I don't want to copy and paste the values every time I change the frequency. I know that there is a way to dynamically change them since I did that in the past thanks to the help of David Park, but unfortunately I could not find the email where he explained how to do it. Can you help me, please?

Many thanks

Ed

2 Replies

Ed,

You can do this by typing your text and enter "Dynamic[variableName]" (where variableName is what you want updated). Next select the "Dynamic[variableName]" and right click and do "Create Inline Cell". Select it again and right click and do "Evaluate in Place".

Now the text will change dynamically.

Regards,

Neil

Posted 11 months ago

Neil,

Many thanks. It worked but I have to say that it took more than a couple of attempts. I remember having the same problem a few years ago. It seems that despite Mathematica new versions, the problem persists.

Regards

Ed

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