MathGroup Archive 2002

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

Search the Archive

RE: Subsetting indexed variable?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg36043] RE: [mg36028] Subsetting indexed variable?
  • From: "DrBob" <majort at cox-internet.com>
  • Date: Wed, 14 Aug 2002 05:35:11 -0400 (EDT)
  • Reply-to: <drbob at bigfoot.com>
  • Sender: owner-wri-mathgroup at wolfram.com

Try

(DownValues@b)[[All, 2]]

Bobby Treat

-----Original Message-----
From: Gareth J. Russell [mailto:gjr2008 at columbia.edu] 
To: mathgroup at smc.vnet.net
Subject: [mg36043] [mg36028] Subsetting indexed variable?

Hi,

I cannot seem to work out how to extract a subset of information from an
indexed variable (without generating a full list/matrix first).

For example, suppose I define:

b[1,3] = 3
b[2,3] = 7
b[2,4] = 5

And I then want to get the list of all DEFINED values of b[2,_], i.e.,
the
result should be {7,5}

Help appreciated!

Gareth

==========================================================
Dr. Gareth J. Russell
Columbia University
E-mail: gjr2008 at columbia.edu
==========================================================







  • Prev by Date: MathLink for Excel (Windows 2000, Office 2000 and Mathematica 4.2
  • Next by Date: Need faster way to combine arrays
  • Previous by thread: Re: Subsetting indexed variable?
  • Next by thread: Re: Subsetting indexed variable?