Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2003

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

Search the Archive

RE: List Operation ?

  • To: mathgroup at
  • Subject: [mg40231] RE: [mg40204] List Operation ?
  • From: "Wolf, Hartmut" <Hartmut.Wolf at>
  • Date: Thu, 27 Mar 2003 06:49:17 -0500 (EST)
  • Sender: owner-wri-mathgroup at

>-----Original Message-----
>From: Sunil Jayatilleke [mailto:sunilj at]
To: mathgroup at
>Sent: Tuesday, March 25, 2003 8:51 PM
>To: mathgroup at
>Subject: [mg40231] [mg40204] List Operation ?
>I have a list as follows
>list1 = 
>Now I want to do the following
>list2 ={{a1,b1,d1},{a2,b2,d2}......................}
>How can I do that ?

list1 = Outer[StringJoin, Characters["abcdef"], ToString /@ Range[5]] // 
{{"a1", "b1", "c1", "d1", "e1", "f1"},
 {"a2", "b2", "c2", "d2", "e2", "f2"},
 {"a3", "b3", "c3", "d3", "e3", "f3"},
 {"a4", "b4", "c4", "d4", "e4", "f4"},
 {"a5", "b5", "c5", "d5", "e5", "f5"}}

In[5]:= list2 = list1[[All, {1, 2, 4}]]
{{"a1", "b1", "d1"}, {"a2", "b2", "d2"}, {"a3", "b3", "d3"},
 {"a4", "b4", "d4"}, {"a5", "b5", "d5"}}

Hartmut Wolf

  • Prev by Date: waiting command
  • Next by Date: Re: matrix differential equations with NDSolve
  • Previous by thread: RE: List Operation ?
  • Next by thread: Derivatives in Other Coord Systems