Re: more looping trouble
- To: mathgroup at smc.vnet.net
- Subject: [mg85455] Re: more looping trouble
- From: Peter Breitfeld <phbrf at t-online.de>
- Date: Mon, 11 Feb 2008 06:08:32 -0500 (EST)
- References: <fomjsd$hsj$1@smc.vnet.net>
Francis Bitonti schrieb: > Sorry for these lame questions but I'm still trying to get my head around > loops. I though I had it but I hit a snag today. > > I have a table of numbers {{1,2,3},{2,3,4}} I want to use a loop to remove > the third integer in each set and reassemble them as a new table. > However, something is going wrong I think it's because i'm not grasping some > fundamental idea about how to perform these type of operations on tables. > What about ls={{1,2,3},{2,3,4}} ls1=Most/@ls or: ls1=Delete[#,3]&/@ls ls2=Last/@ls Gruss Peter -- ==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-== Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de