Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2007

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

Search the Archive

Re: Ordering function weird?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg82676] Re: Ordering function weird?
  • From: Alfred Heiligenbrunner <xyz at abc.de>
  • Date: Sun, 28 Oct 2007 04:01:16 -0500 (EST)
  • References: <ffv29v$aph$1@smc.vnet.net>

Claus schrieb am 27.10.2007 12:01:
> Can anybody explain to me Ordering[y]?
> 
> 
> In[3]:= x = {1, 2, 3, 6, 10, 3, 4}
> y = {1, 2, 7, 8, 9, 1, 2}
> 
> 
> In[7]:= Ordering[x]
> Ordering[y]
> 
> Out[7]= {1, 2, 3, 6, 7, 4, 5}
> 
> Out[8]= {1, 6, 2, 7, 3, 4, 5}
> 

y[[Ordering[y]]] is a sorted list. Seems ok. What's weird on it?

In[9]:= y[[Ordering[y]]]

Out[9]= {1,1,2,2,7,8,9}


  • Prev by Date: Re: Mathematica not considering an assumption
  • Next by Date: How to use Fourier (fft) to solve eplliptic partial differential equation?
  • Previous by thread: Re: Ordering function weird?
  • Next by thread: Re: Ordering function weird?