Re: Conversion of output

• To: mathgroup at smc.vnet.net
• Subject: [mg19085] Re: [mg19024] Conversion of output
• From: BobHanlon at aol.com
• Date: Thu, 5 Aug 1999 01:35:06 -0400
• Sender: owner-wri-mathgroup at wolfram.com

```Christopher,

soln = {a1 -> 0.00400772472374540367, a2 -> -1.90417580406264459*10^-6,
a3 -> 499088.922439139537, a4 -> 1.31534993678125777*10^-9,
a5 -> 7728.37550019371821};

Method 1

{a1, a2, a3, a4, a5} /. soln

Method 2

soln /. (a_ -> val_) :> val

Method 3

Last[#] & /@ soln

Last /@ soln

#[[2]] & /@ soln

Method 4

Cases[soln, x_ :> Last[x]]

Cases[soln, x_ :> x[[2]]]

Bob Hanlon

In a message dated 8/3/99 5:42:25 PM, mack at tvt.tu-darmstadt.de writes:

>when using the NonlinearFit-function of Mathematica, I get an
>output like
>
> {a1 -> 0.00400772472374540367, a2 -> -1.90417580406264459*10^-6,
>    a3 -> 499088.922439139537, a4 -> 1.31534993678125777*10^-9,
>    a5 -> 7728.37550019371821}
>
>I'd like to convert this output to a vector with five elements
>(containing the values of a1 to a5 shown above).
>
>Can anybody tell me how to do this ?
>

```

• Prev by Date: RE: latest on Mathematica 4 bug
• Next by Date: Re: Biased Random[Integer]?
• Previous by thread: Conversion of output
• Next by thread: Re: Conversion of output