MathGroup Archive 2003

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

Search the Archive

Re: Data Manipulation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg43306] Re: Data Manipulation
  • From: bobhanlon at aol.com (Bob Hanlon)
  • Date: Sun, 24 Aug 2003 04:55:02 -0400 (EDT)
  • References: <bi7o00$pcf$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

data=Table[Random[Integer,6],{10}]

{0, 3, 4, 5, 5, 4, 5, 6, 2, 6}

Fold[If[MemberQ[#1, #2], #1, Append[#1,#2]]&,{},data]

{0, 3, 4, 5, 6, 2}


Bob Hanlon

In article <bi7o00$pcf$1 at smc.vnet.net>, Ch akpovo <akpovo at cennas.nhmfl.gov>
wrote:

<< I have an elementary problem,
I created a power spectrum of my data and it gives me expect from the first
and the element number datalength/2+1, all the others are repeated. What I
want to do is to use a mathematica command that remove that repetition
without sorting. The command Union[list] is removing the repeated elements
but is sorting the new list. Can anyone help me? 


  • Prev by Date: RE: Pick random element from list
  • Next by Date: Re: LCM With Variable Number of Arguments
  • Previous by thread: Data Manipulation
  • Next by thread: Re: Data Manipulation