Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

Re: Pattern matching partial derivatives

  • To: mathgroup at smc.vnet.net
  • Subject: [mg52402] Re: [mg52372] Pattern matching partial derivatives
  • From: "David Park" <djmp at earthlink.net>
  • Date: Fri, 26 Nov 2004 01:04:30 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

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