MathGroup Archive 1996

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

Search the Archive

Re: Function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg3829] Re: Function
  • From: pecora at zoltar.nrl.navy.mil (Louis M. Pecora)
  • Date: Mon, 29 Apr 1996 00:30:01 -0400
  • Organization: Naval Research Laboratory
  • Sender: owner-wri-mathgroup at wolfram.com

In article <4letbt$esv at dragonfly.wolfram.com>, Roberto Diego
<roberto at medusa.es> wrote:

> Could you please give me some advice?
> 
>  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}. 

Try,

Thread[Divide[Rest[ls],Take[ls,Length[ls]-1]]]

where ls is your original list {a1,...}.

-- 
Louis M. Pecora
pecora at zoltar.nrl.navy.mil

/* My views and opinions are not those of the U.S. Navy.
   If you want those, you have to start a war.  */

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


  • Prev by Date: Re: Function
  • Next by Date: Re: Linux version of mathematica
  • Previous by thread: Re: Function
  • Next by thread: Export EPS