Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #8523

Re: Repackaging function arguments

From Bob Hanlon <hanlonr357@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Repackaging function arguments
Date 2012-02-13 08:43 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jhaifs$552$1@smc.vnet.net> (permalink)
References <201202121000.FAA25081@smc.vnet.net>

Show all headers | View raw


Note that FindRoot has attribute HoldAll

Attributes[FindRoot]

{HoldAll, Protected}

params = {AccuracyGoal -> 30, PrecisionGoal -> 30, WorkingPrecision -> 50};

FindRoot[Sin[x] + Exp[x], {x, 0}, Evaluate[params]]

{x -> -0.58853274398186107743245204570290368853127151610903}


Bob Hanlon

On Sun, Feb 12, 2012 at 5:00 AM, Sam Takoy <sam.takoy@yahoo.com> wrote:
> Hi,
>
> Suppose I have a variable
>
> params = { AccuracyGoal -> 30, PrecisionGoal -> 30, WorkingPrecision -
>> 50 }
>
> How do I "repackage" it so I can pass it to functions such as
> FindRoot?
>
> Thank you in advance,
>
> Sam
>

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: Repackaging function arguments Bob Hanlon <hanlonr357@gmail.com> - 2012-02-13 08:43 +0000

csiph-web