MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: lists w/o double brackets


Gavin K Brennen wrote:
> 
> Hello,
> 
> I am using the function FindRoot with a large number of simultaneous equations.
> 
>         FindRoot[eqs,initialvals]
> 
> I have a function for generating the equations which works fine as a list
> input in FindRoot, however I am having difficulty creating a function for
> generating initialvals that will be accepted by FindRoot.  The problem
> seems to be that FindRoot demands a format
> 
>         FindRoot[{eq1,eq2,...,eqn},{var1,val1},{var2,val2},...,{varn,valn}]
> 
> the variables and initial values of which must appear as a list without
> double brackets.  The function I have for generating the initial values
> always outputs the list as follows
> 
>         Input
>                 initialvals
>         Output
>                 {{var1,val1},{var2,val2},...,{varn,valn}}.
> 

eqns = {{eq1, eq2,...,eqn}}
initialvals = {{var1, val1},{var2, val2},...,{varn, valn}}
MapThread[FindRoot, Join[eqns, initialvals], 0]

Ciao
     -erk-


  • Prev by Date: Re: image in PDF file
  • Next by Date: Re: Storing Data into Excel - Pls Help ...
  • Previous by thread: Re: lists w/o double brackets
  • Next by thread: Re: lists w/o double brackets