Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

Re: new function

  • To: mathgroup at
  • Subject: [mg67300] Re: new function
  • From: "Jens-Peer Kuska" <kuska at>
  • Date: Sat, 17 Jun 2006 04:36:13 -0400 (EDT)
  • Organization: Uni Leipzig
  • References: <e6tc5j$dt8$>
  • Sender: owner-wri-mathgroup at


yourFunction[a_,{list_}]:= ..

will match to calls like yourFunction[any,{a}],

but never to yourFunction[any,{a,b,c}]

You mean
yourFunction[a_,list_List]:= ...

and your function that set all variables in list
to zero should look like

yourFunction[a_,lst:{__Symbol}]:=a /. (#->0 & /@ 


<gianfred at> schrieb im Newsbeitrag 
news:e6tc5j$dt8$1 at
| Hi,
| I'm writing a package and I want to define a 
function of the form:
| Function[a_,{list_}], where "a" is a generic 
expression of more variables and
| "list" is a list of those variable that must go 
to zero. So in this way,
| Function automatically eliminate the variables 
that I specify after the comma.
| How can I create this function?
| Thanks,
| Maria

  • Prev by Date: Re: vertical or perpendicular offets?
  • Next by Date: Re: standard errors and confidence intervals in NonlinearRegress
  • Previous by thread: Re: new function
  • Next by thread: vertical or perpendicular offets?