MathGroup Archive 2001

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

Search the Archive

Functions with Options


[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