Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #16763
| From | David Reiss <dbreiss@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: How to extract the numerical value of a dynamical variable? |
| Date | 2014-04-10 07:09 +0000 |
| Message-ID | <li5g2p$3l5$1@smc.vnet.net> (permalink) |
| References | <li2vh1$pcu$1@smc.vnet.net> |
| Organization | Time-Warner Telecom |
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
>
> 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
Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Find similar
How to extract the numerical value of a dynamical variable? xan.mar.cm@gmail.com - 2014-04-09 08:14 +0000 Re: How to extract the numerical value of a dynamical variable? David Reiss <dbreiss@gmail.com> - 2014-04-10 07:09 +0000
csiph-web