MathGroup Archive 2002

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

Search the Archive

Taking Options from Wrappers

  • To: mathgroup at smc.vnet.net
  • Subject: [mg38064] Taking Options from Wrappers
  • From: "ng" <removethisgeorgakopoulos at mindspring.com>
  • Date: Thu, 28 Nov 2002 14:08:58 -0500 (EST)
  • Reply-to: "ng" <georgakopoulosNOSPAM at LETSSTOPGETTINGSPAMmindspring.com>
  • Sender: owner-wri-mathgroup at wolfram.com

I am trying to write a function and I want it to use an option that is
usually defined from the wrapping function, and I cannot figure out how that
might be done without rewriting the wrapping function to "push" its options
into its contents using FilterOptions[ ].

Suppose, for example, I want to define the function ConstantWave[ scale_ ]
which would produce a sine wave of constant proportional height having
contents like
Table[{x, scale scaleinherited Sin[x]}, {x, xmin, xmax, xstep}]
while I want scaleinherited, xmin, xmax, and xstep to be determined by the
Plot[ ] function into which the ConstantWave[ ] function would be placed.
The variables xmin and xmax would be taken from the limits of Plot[ ], xstep
would be taken from the PlotPoints option, and scaleinherited from the
AspectRatio option of Plot[ ].

Any ideas? Thanks!

Nicholas




  • Prev by Date: Re: Data Conversion
  • Next by Date: Re: Mathematica Documentation
  • Previous by thread: Parsing records in mathematica
  • Next by thread: Mixed-Integer Programming package