Re: pick out an element from list

• To: mathgroup at smc.vnet.net
• Subject: [mg98052] Re: [mg98011] pick out an element from list
• From: Adriano Pascoletti <adriano.pascoletti at dimi.uniud.it>
• Date: Sun, 29 Mar 2009 02:43:10 -0500 (EST)
• References: <200903281040.FAA04302@smc.vnet.net>

```If L is your list

(Delete[L, #1] - L[[#1]] & ) /@ Range[Length[L]]

gives you the result.

Example

In[3]:= L = RandomInteger[100, {5}]
Out[3]= {63, 59, 75, 17, 99}
In[4]:= (Delete[L, #1] - L[[#1]] & ) /@ Range[Length[L]]
Out[4]= {{-4, 12, -46, 36}, {4, 16, -42, 40}, {-12, -16, -58, 24},
{46, 42, 58, 82}, {-36, -40, -24, -82}}

> i have a list with n element.i want to pick out an element from the list,
> and to deduct the element from all the other residual elements. This proc=
ess
> is the first step. i must apply all elements of the list, invariably.
> Namely, in conclusion, i will obtain n list with n-1 elements. now, i wil=
l
> try to explain as numerically. let element number of the list be 2500. an=
d i
> am picking out the first element of the list. and i'm deducting the first
> element from the residual elements of the list. and now, i have a list wi=
th
> 2499 elements.after that, i'm passing the second element, and i'm applyin=
g
> the same processes. =FD can't do this, can anyone help me???
>
>

```

• Prev by Date: Re: pick out an element from list
• Next by Date: Re: pick out an element from list
• Previous by thread: pick out an element from list
• Next by thread: Re: pick out an element from list