MathGroup Archive 2001

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

Search the Archive

Functions with Options

  • To: mathgroup at smc.vnet.net
  • Subject: [mg31984] Functions with Options
  • From: guillerm at usal.es
  • Date: Fri, 14 Dec 2001 16:53:20 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

[Please moderator, delete my previouos E mail]

I would like build functions with Options using Mathematica build-up functions 
with the same options.

Here is a naïf example:

newPlot[f_, {x_, min_, max_}, opts__] := Plot[f, {x, min, max}, opts]

If I use this function given options the solution is OK. i.e:

newPlot[Sin[x], {x, 0 , 2 Pi}, PlotRange -> All]

but, of course, it doen`t work if it not included options. i.e:
  
In[]:= newPlot[Sin[x], {x, 0 , 2 Pi}]

Out[]:= newPlot[Sin[x], {x, 0, 2 Pi}]

How it should be made the function in the way that it works given or not given 
values for options.  

Thanks

---------------------------------------------
This message was sent using Endymion MailMan.
http://www.endymion.com/products/mailman/




  • Prev by Date: Re: Preserve subscripts like integers using N
  • Next by Date: Solved: Packed array generation and complex numbers
  • Previous by thread: Functions with Options
  • Next by thread: Re: Functions with Options