Re: Function

• To: mathgroup at smc.vnet.net
• Subject: [mg3875] Re: [mg3819] Function
• From: Robert Garian <rgar at loc.gov>
• Date: Sat, 4 May 1996 02:15:51 -0400
• Sender: owner-wri-mathgroup at wolfram.com

```On Sat, 27 Apr 1996, Roberto Diego wrote:

>
>  I4m trying to find a function that works on a list like {a1, a2, a3,
> a4, ..., an} and returns a list like {a2/a1, a3/a2, a4/a3, ... an/an-1}.
>
> It should be easy but I can4t find the answer.
>
> Thanks a lot.
>
>

A quick and dirty way to get what you want :
A={a,b,c,d,e}
Table[A[[i]]/A[[i-1]],{i,2,Length[A]}]
gives {b/a,c/b,d/c,e/d}

||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
"You can be fatalistic if you want to, but it won't do any good."
(Baloo)
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

==== [MESSAGE SEPARATOR] ====

```

• Prev by Date: Re: Help on Function
• Next by Date: Re: Mma and Adobe Acrobat?
• Previous by thread: Re: Help on Function
• Next by thread: Re: Function