Re: subtle dumb question
- To: mathgroup at smc.vnet.net
- Subject: [mg55623] Re: [mg55574] subtle dumb question
- From: Chris Chiasson <chris.chiasson at gmail.com>
- Date: Thu, 31 Mar 2005 01:24:45 -0500 (EST)
- References: <200503300821.DAA21827@smc.vnet.net> <c2854f8553cdd30b84398356ccb2e7c8@mimuw.edu.pl>
- Reply-to: Chris Chiasson <chris.chiasson at gmail.com>
- Sender: owner-wri-mathgroup at wolfram.com
Andrzej Kozlowski: Smooth. I now see that mapping thread to blah creates the necessary duplication for a regular set of part indices to work. Thank you, On Wed, 30 Mar 2005 13:21:37 +0200, Andrzej Kozlowski <akoz at mimuw.edu.pl> wrote: > > On 30 Mar 2005, at 10:21, Chris Chiasson wrote: > > > Dear MathGroup, > > > > What is the fastest/neatest/most efficient way to do the following?: > > > > blah={{beta,{a,b,c}},{zeta,{x,y,z}}} > > > > <<magic here>> > > > > {{beta,b},{zeta,y}} > > > > What if a have a list of blahs and I want a list of those magic > > results for each blah? > > > > Is there a way to use part (or take or extract) on blah or the list of > > blahs? > > > > Thank you for your valuables, > > (heh) > > -- > > Chris Chiasson > > Kettering University > > Mechanical Engineering > > Graduate Student > > > > Part 1: > > Map[Thread,blah][[All,2]] > > {{beta,b},{zeta,y}} > > Part 2: > The usual way to deal with this sort of thing: just use map. Namely, use > > Map[Thread,#][[All,2]]&/@ls > > where ls is your list of blahs. > > Andrzej Kozlowski > > -- Chris Chiasson Kettering University Mechanical Engineering Graduate Student 1 810 265 3161
- References:
- subtle dumb question
- From: Chris Chiasson <chris.chiasson@gmail.com>
- subtle dumb question