MathGroup Archive 1996

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

Search the Archive

Re: Help on Function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg3847] Re: [mg3799] Help on Function
  • From: Robert Pratt <rpratt at math.unc.edu>
  • Date: Mon, 29 Apr 1996 00:33:13 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

Here's a one-liner (okay two):

quotients[list_]:=Take[RotateLeft[list], Length[list]-1] / Take[list, 
	Length[list]-1]

Rob Pratt
Department of Mathematics
The University of North Carolina at Chapel Hill
CB# 3250, 331 Phillips Hall
Chapel Hill, NC  27599-3250

rpratt at math.unc.edu

On Sun, 21 Apr 1996, Roberto Diego wrote:

> Hi people,
> 
> Could you please help me? I4m trying to write a function (not procedure 
> if possible) that works on a list such as {a1, a2, a3, a4, ...} and 
> returns a list {a2/a1, a3/a2, a4/a3, ...}. I know it should be an easy 
> task but I4m a newbe...
> 
> Thanks a lot
> 
> 


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


  • Prev by Date: Re: supplying an arbitrary number of lists to functions
  • Next by Date: [no subject]
  • Previous by thread: Help on Function
  • Next by thread: RE: Help on Function