How to extract the numerical value of a dynamical variable?
- To: mathgroup at smc.vnet.net
- Subject: [mg132534] How to extract the numerical value of a dynamical variable?
- From: xan.mar.cm at gmail.com
- Date: Wed, 9 Apr 2014 04:14:06 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- Delivered-to: l-mathgroup@wolfram.com
- Delivered-to: mathgroup-outx@smc.vnet.net
- Delivered-to: mathgroup-newsendx@smc.vnet.net
Hello Could you please help me with following? How can I get a real number (and not an expression) from a dynamic variable in "manipulate"? (my aim is to use that value in another function as "NonlinearModelFit" Have a look at this example: Lini = 1.95; SumStart = 2750.; SumStop = 3100.; {Manipulate [ Plot[ {Exp[-(2.97018 10^6 - 4481.87021 [Omega] + 2.53689 [Omega]^2 - 6.38403*10^-4 [Omega]^3 + 6.02659*10^-8 [Omega]^4) * L*10^-4]} , {[Omega], SumStart, SumStop}, PlotRange -> {0, 1}, GridLines -> Automatic, PlotStyle -> {{Red, Thickness[0.004]}}] , {{L, L0}, 0.0, 20, Appearance -> "Labeled"} (* =E9paisseur d'eau en microm=E8tres*) , LocalizeVariables -> False , Initialization -> {(L := Lini)} ] , {L0 = Dynamic[L] // N}; } If I type (when the cursor's value is put on 13.1) : In[1]= 5 + L0 + 0.1 I get: Out[1]= 5.1 + 13.1 a mathematical expression! I am looking for the corresponding real number 18.2 corresponding to the present value of the cursor!!! How to get it? Thanks for your help Christian