MathGroup Archive 2007

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

Search the Archive

Re: Ordering function weird?


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?