Re: more looping trouble
- To: mathgroup at smc.vnet.net
- Subject: [mg85469] Re: more looping trouble
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Mon, 11 Feb 2008 06:16:00 -0500 (EST)
- References: <fomjsd$hsj$1@smc.vnet.net>
Hi,
thank you ! that is a fine idea to make GIF images
from a trivial input, so that the guy that try to
help you have to retype all your input. It it is
still much better to create a HTML page instead of
copy/paste the ASCII text !
if you don't insist on a loop
Make some data:
data = Table[RandomReal[], {10}, {3}];
and
Most /@ data
or
data /. {x_?NumericQ, y_?NumericQ, _} :> {x, y}
or
Drop[#,-1]& /@ data
or
Take[#,2] & /@ data
or
RotateLeft[Rest[RotateRight[#]], 2] & /@ data
and 2^10 other versions will do that.
Regards
Jens
Francis Bitonti wrote:
> 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.
>
> CLICK THIS LINK TO VIEW MY NOTEBOOK IN HTML FORMAT
> http://www.fadarch.com/math/test.html<http://www.fadarch.com/math/test.html>
>
>
>
>
>