MathGroup Archive 2000

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

Search the Archive

Malfunction of Position or where am I wrong?


Dear listers,

I try to use Position to obtain the positions for a lower or upper 
triangular elements of a matrix. The codes below do not work correctly.

<< DiscreteMath`Combinatorica`
tst = Table[Range[i + 70, i + 72] , {i, 35}];
(fullranktst = Outer[List, tst, tst, 1, 1]) // Dimensions
(parsimtst = KSubsets[tst, 2]) // Dimensions
Position[fullranktst, #] & /@ parsimtst

However, when I modify the last line to inspect the first three elements:
 
Position[fullranktst, #] & /@ parsimtst[[{1, 2, 3}]]

, it outputs the correct answer. Why? Where am I missing?

Wen-Feng


  • Prev by Date: Re: Why doesn't Log[ E^x ] = x ?
  • Next by Date: Re: How to Protect a Not Editable Cell from being Removed?
  • Previous by thread: Re: Re: 1/Trig function - help
  • Next by thread: Re: Malfunction of Position or where am I wrong?