Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #15062 > unrolled thread

Re: Finding a function within an arbitrary expression

Started byBill Rowe <readnews@sbcglobal.net>
First post2013-07-01 09:41 +0000
Last post2013-07-01 09:41 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Re: Finding a function within an arbitrary expression Bill Rowe <readnews@sbcglobal.net> - 2013-07-01 09:41 +0000

#15062 — Re: Finding a function within an arbitrary expression

FromBill Rowe <readnews@sbcglobal.net>
Date2013-07-01 09:41 +0000
SubjectRe: Finding a function within an arbitrary expression
Message-ID<kqris6$4a1$1@smc.vnet.net>
On 6/30/13 at 3:29 AM, Anthony.J.Mannucci@jpl.nasa.gov (amannucci)
wrote:

>I am looking for a function u[1,0] within a list of expressions. The
>function might not be defined yet. For example, a list of
>expressions might be:

>{3*u[1,0], u[0,0]/10., 1/u[1,0], ...}

>I want to find all the expressions that have the function u[1,0] in
>it. There is certainly a way to do this "textually". How would one
>do this with patterns? Is it possible? Thank you.

One way:

In[53]:= DeleteCases[{3*u[1, 0], u[0, 0]/10.,
  1/u[1, 0]}, _?(FreeQ[#, u[1, 0]] &)]

Out[53]= {3*u[1, 0], 1/u[1, 0]}


[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web