Re: Assigning FindRoot output
From: David Park (djmp_at_earthlink.net)
Date: 03/16/05
- Previous message: Jens Axel Søgaard: "Re: CAS, Lambda Calculus, Continuation and Functional Programming"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 16 Mar 2005 21:58:26 GMT
"DZ" <17708@881732121.2022521118.12339.13632.640> wrote in message
news:20433@12864107.2538422598.10077.22656.25011...
> In[1] := FindRoot[2 x == 5, {x,0,1}]
> Out[1] := {x -> 2.5}
>
> How to assign the output value (2.5) to a variable?
>
x = x /. First[FindRoot[2*x == 5, {x, 0, 1}]]
2.5
But I would be wary of assigning values to single letter symbols because
they are more valuable as pure symbols.
David Park
djmp@earthlink.net
http://home.earthlink.net/~djmp/
- Previous message: Jens Axel Søgaard: "Re: CAS, Lambda Calculus, Continuation and Functional Programming"
- Messages sorted by: [ date ] [ thread ]