MathGroup Archive 1996

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

Search the Archive

Re: supplying an arbitrary number of lists to functions


In article <4l792h$1ov at ralph.vnet.net>
Dirk Kautz <kautz at tyto.bio2.rwth-aachen.de> writes:

> Given a list of lists like  
> 
> data = {{a,b},{c,d},...}},
> 
> how do  I provide a function f[x__] which takes an arbitrary number
> of lists as input, with the sublists of the above list?
> 
> In my special case, I want to do:
> 
> MultipleListPlot[{a,b},{c,d},...]
> 
> Of course, if the list is not too long, I can always do
> MultipleListPlot[data[[1]],data[[2]],...],
> 
> but what in the general case?

I do not understand what your f[x__] is supposed to do, but
your special case has an easy solution. If
data = {{a,b},{c,d},...}}, then
MultipleListPlot[data[[1]], data[[2]], ...] is the same as
MultipleListPlot[Sequence @@ data].

Sincerely,

Arnd Roth
Abteilung Zellphysiologie
Max-Planck-Insitut fuer Medizinische Forschung
Postfach 10 38 20, D-69028 Heidelberg, Germany
http://sunny.mpimf-heidelberg.mpg.de/people/roth/ArndRoth.html

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


  • Prev by Date: Re: Mathematica: should I move to Windows from X?
  • Next by Date: Re: Help on Function
  • Previous by thread: Re: supplying an arbitrary number of lists to functions
  • Next by thread: ???? How to assign result from Solve to variable ????