MathGroup Archive 1999

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

Search the Archive

Re: Pattern of a List of Pairs

  • To: mathgroup at smc.vnet.net
  • Subject: [mg20892] Re: Pattern of a List of Pairs
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Sat, 20 Nov 1999 01:07:06 -0500 (EST)
  • Organization: Universitaet Leipzig
  • References: <812ajv$1hc@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

try

PairArg[l : {{_, _} ..}] := Transpose[l]


and 

PairArg[{{1, 2}, {3, 4}, {5, 6}, {7, 8}}]
{{1, 3, 5, 7}, {2, 4, 6, 8}}

works, while

PairArg[{{1, 2, 10}, {3, 4}, {5, 6}, {7, 8}}]
PairArg[{{1, 2, 10}, {3, 4}, {5, 6}, {7, 8}}]

does not match.

Hope that helps
  Jens

Hans Steffani wrote:
> 
> I need a function wich gets a list of pairs. How do I build
> the head of this function.
> 
> h.f.s.
> --
> Hans Friedrich Steffani
> Institut fuer Elektrische Maschinen und Antriebe, TU Chemnitz
> mailto:hans.steffani at e-technik.tu-chemnitz.de
> http://www.tu-chemnitz.de/~hfst/


  • Prev by Date: Calling a c++ dll with Mathlink
  • Next by Date: Re: Pattern of a List of Pairs
  • Previous by thread: Calling a c++ dll with Mathlink
  • Next by thread: Re: Pattern of a List of Pairs