Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1996

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

Search the Archive

Re: Function

  • To: mathgroup at
  • Subject: [mg3888] Re: [mg3819] Function
  • From: Dennis M Schneider <dschneid at>
  • Date: Sat, 4 May 1996 23:22:16 -0400
  • Sender: owner-wri-mathgroup at

On Sat, 27 Apr 1996, Roberto Diego 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}. 
> It should be easy but I can4t find the answer.
> Thanks a lot.

Since Divide is listable, just form the two appropriate lists and apply 

ratios[list_List] := Divide[Drop[list,1],Drop[list,-1]]

Dennis M. Schneider
Department of Mathematics
Knox College
Galesburg, IL  61401
(309) 341 7420


  • Prev by Date: Replacement Rule
  • Next by Date: Re: Windows 95 Problems
  • Previous by thread: RE: Function
  • Next by thread: Re: Function