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


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

Re: Finding a function within an arbitrary expression

Started byAlexei Boulbitch <Alexei.Boulbitch@iee.lu>
First post2013-07-01 09:42 +0000
Last post2013-07-01 09:42 +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 Alexei Boulbitch <Alexei.Boulbitch@iee.lu> - 2013-07-01 09:42 +0000

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

FromAlexei Boulbitch <Alexei.Boulbitch@iee.lu>
Date2013-07-01 09:42 +0000
SubjectRe: Finding a function within an arbitrary expression
Message-ID<kqriun$4aa$1@smc.vnet.net>
I am trying to figure out what that pattern is for the following. The difficulty here is that I can think textually, but not in Mathematica patterns.

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.


Hi, Anthony,

Try this:

Select[{3*u[1, 0], u[0, 0]/10., 1/u[1, 0]}, MemberQ[#, u[1, 0]] &]


{3 u[1, 0], 1/u[1, 0]}

Have fun, Alexei



Alexei BOULBITCH, Dr., habil.
IEE S.A.
ZAE Weiergewan,
11, rue Edmond Reuter,
L-5326 Contern, LUXEMBOURG

Office phone :  +352-2454-2566
Office fax:       +352-2454-3566
mobile phone:  +49 151 52 40 66 44

e-mail: alexei.boulbitch@iee.lu




[toc] | [standalone]


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


csiph-web