MathGroup Archive 2004

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

Search the Archive

Re: Pattern matching partial derivatives


Nicolas,

Since

D[f_, x_, Rule[NonConstants, nc_]]
0

you need HoldPattern here.

MatchQ[D[f, x, NonConstants -> {f}], 
  HoldPattern[D[f_, x_, NonConstants -> nc_]]]
True

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/ 


From: Nicolas Girard [mailto:nicolas.girard at strasbourg.fr]
To: mathgroup at smc.vnet.net


Hi all,
I can't get finding patterns that would match a simple partial derivative:

Input:
  ?f
  ?x
  D[f, x, NonConstants -> {f}] // FullForm

Output:
  Global`f
  Global`x
  D[f, x, Rule[NonConstants, List[f]]]

Input:
  MatchQ[
    D[f, x, Rule[NonConstants, List[f]]],
    D[f_, x_, Rule[NonConstants, nc_]]
  ]
Output:
  False


Am I damned ?
Many thanks in advance !
Cheers,
Nicolas




  • Prev by Date: Re: Principal Value integral
  • Next by Date: Re: Pattern matching partial derivatives
  • Previous by thread: Pattern matching partial derivatives
  • Next by thread: Re: Pattern matching partial derivatives