Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

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

Search the Archive

Re: finding all definitions matching a pattern

  • To: mathgroup at smc.vnet.net
  • Subject: [mg98012] Re: finding all definitions matching a pattern
  • From: dr DanW <dmaxwarren at gmail.com>
  • Date: Sat, 28 Mar 2009 05:40:20 -0500 (EST)
  • References: <gqiaar$opg$1@smc.vnet.net>

The function is called DownValues[].

In[4]:= DownValues[F]

Out[4]= {HoldPattern[F[0]] :> 3, HoldPattern[F[3]] :> 11,
 HoldPattern[F[7]] :> 7}

Not exactly the form you were looking for, but you can parse the
output pretty easily

In[11]:= Cases[DownValues[F], RuleDelayed[_[F[x_]], y_] :> {x, y}]

Out[11]= {{0, 3}, {3, 11}, {7, 7}}

Daniel


  • Prev by Date: Does mathematica7 support fontconfig?
  • Next by Date: Re: Solve problem
  • Previous by thread: Re: finding all definitions matching a pattern
  • Next by thread: Re: finding all definitions matching a pattern