# Accessing variables outside DynamicModule [on hold]

I have this DynamicModule which is basically a form of input fields that are parameters. My two final functions are H1 and H2 which I also define as disabled InputFields.

Edit: I've only included one input field but this H1 and H2 variables depend on other variables that I've created input fields for in my code. In an effort to save space, I've removed those other variables.

The new question is basically: WITHIN this dynamic module, after I've gotten this H1 and H2, I want to access them and plot them. But anytime I try to access them and manipulate them, nothing happens.

Thoughts?

DynamicModule[{R = .005, a = .015, To = 310 , Tb = 310, wb = 0.0064,
cb = 4180, c2 = 3600, phi = .0002 , c = 670, k1 = .502, k2 = .502,
pb = 1000, P = 1.95*10^5, p1, p2 = 1060, c1, l1, l2, f1, f2, H1,
H2, r = .0001, C1, C2, No, N1, N2, N3, N4, N5, N0},

Panel[
Grid[
Transpose[{{
Style["H1", Green], Style["H2", Green]   }, {
{
InputField[
Dynamic[H1 =
C1*(Exp[Sqrt[l1]*r] - Exp[-Sqrt[l1]*r]) + (f1/l2)*r],
Enabled -> False],
InputField[Dynamic[H2 = C2*(Sqrt[l1]   )], Enabled -> False]
}}] , Alignment -> Left] , ImageMargins -> 50]
]

-

## put on hold as off-topic by Kuba, Michael E2, Jens, ubpdqn, bobthechemistNov 17 at 2:25

• The question does not concern the technical computing software Mathematica by Wolfram Research. Please see the help center to find out about the topics that can be asked here.
If this question can be reworded to fit the rules in the help center, please edit the question.

Hello, welcome to Mathematica.SE. Please reduce the code to the minimial working example, one InputField will be enough. p.s. You can place Button["save H", var=H1] where var is a Global  variable. –  Kuba Mar 14 at 8:33
Hey sorry about that. I'll remember to shorten code for next time. Is there a way to access H1 from inside the module? Ideally, I could manipulate the parameters above and then have the graph change in real time. –  user402516 Mar 14 at 9:20
No need to wait to next time :) make a minimal example now and edit your question. You can use Plot with Sin where frequency is provied via single InputField` for example. –  Kuba Mar 14 at 9:22
Before plotting, let's say I need to define a function of s by evaluating H1. I would say something like: f[s_] := Evaluate@H1. I would input this right after ImageMargins -> 50]. But that doesn't work. I get an error, but I need that function defined in order to plot properly. Thanks for the help here. Very much appreciated. –  user402516 Mar 14 at 9:33
This question appears to be off-topic because it is poorely stated, so not useful for future visitors, and OP does not care anyway. –  Kuba Nov 16 at 22:55