RE: Removing Outer Braces
- To: mathgroup at smc.vnet.net
- Subject: [mg14370] RE: [mg14303] Removing Outer Braces
- From: Daniel CLEMENT <dclement at mail.cpod.fr>
- Date: Thu, 15 Oct 1998 00:29:09 -0400
- Sender: owner-wri-mathgroup at wolfram.com
Dennis,
It looks like Mathematica _always_ encloses its results in {}.
In order to represent your GuessList without the outer {} you could
write GuessList /. {x__} - > x (*note the double underscore*) which
would give
Sequence[{RP[1],1.2,0.0,3.0},{RP[2],2.0,0.0,5.0},{RP[3],0.5,0.0,1.0}]
this represents the list without its outer braces.
But wouldn't it be simpler to Map[(FindRoot[Eqn,#])&,GuessList] ?
Daniel CLEMENT
> ----- Original Message -----
> From: Dennis Benjamin
To: mathgroup at smc.vnet.net
> [SMTP:dennis.benjamin at molecular-sciences.oxford.ac.uk]
> Sent: Tuesday, October 13, 1998, 7:21:18
> To: mathgroup at smc.vnet.net
> Subject: [mg14303] Removing Outer Braces
>
> Hi All:
>
> First off , thanks again to everyone who sent email answering my
> previous question.
>
> I have constructed a list of initial guesses for FindRoot, this list
> looks something like:
>
> GuessList={{RP[1],1.2,0.0,3},{RP[2],2.0,0.0,5.0},{RP[3],0.5,0.0,1.0}}
>
> although there are tens-hundreds of RP[n]. What I want to do is write
>
> FindRoot[Eqn,GuessList]
>
>
> How do I remove the outer braces of GuessList in order to do this?I
> found a solution to a similar problem in the MathGroup archives,
>
> FindRoot[Eqn,Apply[##&,Guesslist]] or FindRoot[Eqn, Sequence @@
> Guesslist]
>
> but neither seemed to work (Mathematica 3.01, Winows NT)
>
> Thankks in advance for any suggestions!
>
> Dennis
>
>
>
> ----- End Of Original Message -----