Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2002
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2002

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

Search the Archive

Re: irritating little problem

  • To: mathgroup at smc.vnet.net
  • Subject: [mg32928] Re: [mg32906] irritating little problem
  • From: BobHanlon at aol.com
  • Date: Wed, 20 Feb 2002 01:26:06 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

In a message dated 2/19/02 3:25:04 AM, micweij at eka.ericsson.se writes:

>I have a simple vector 
>and I want to find the position of elements that are equal.
>
>I.e I want to test the vector and find all cases of similar elements.
>
>Brute force is not what I want, it can be a long vector.
>

Select[{#, Position[vec, #]}& /@ Union[vec],
 
  Length[#[[2]]]>1&]


Bob Hanlon
Chantilly, VA  USA


  • Prev by Date: Re: FindMinimum within a specific interval
  • Next by Date: How to plot the earth/world in 3D?
  • Previous by thread: Re: irritating little problem
  • Next by thread: Re: irritating little problem