Re: How to extract the numerical value of a dynamical variable?

• To: mathgroup at smc.vnet.net
• Subject: [mg132546] Re: How to extract the numerical value of a dynamical variable?
• From: David Reiss <dbreiss at gmail.com>
• Date: Thu, 10 Apr 2014 03:08:57 -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
• References: <li2vh1\$pcu\$1@smc.vnet.net>

```use the Setting function as in

Setting[ 5 + L0 + 0.1 ]

--David

On Wednesday, April 9, 2014 4:14:25 AM UTC-4, Christian Marliere wrote:
> Hello
>
>
>
>
> 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?
>
>
>