MathGroup Archive 2010

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

Search the Archive

locally changing Options

  • To: mathgroup at smc.vnet.net
  • Subject: [mg108224] locally changing Options
  • From: hemmecke <hemmecke at gmail.com>
  • Date: Thu, 11 Mar 2010 06:34:55 -0500 (EST)

In a function I'd like to temporarily say

foo[x_]:=Module[{...},
  ...
  SetOptions[RowReduce, Method->OneStepRowReduction];
  ...
]

without affecting the global setting for RowReduce when I call foo.

My experiments wrapping the SetOptions with a Block structure were not
fruitful so far.
The only thing I can think of is something of the form

  method = Options[RowReduce, Method];
  SetOptions[RowReduce, Method->OneStepRowReduction];
  ... do something ...
  SetOptions[RowReduce,method]

But that looks ugly.

Any suggestions with built-in Mathematica features to achieve this kind of
locality.

Ralf


  • Prev by Date: elementary questio about packages
  • Next by Date: bad Mathieu functions
  • Previous by thread: Re: elementary questio about packages
  • Next by thread: Re: locally changing Options