Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*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 2000

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

Search the Archive

Malfunction of Position or where am I wrong?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg24250] Malfunction of Position or where am I wrong?
  • From: d8442803 at student.nsysu.edu.tw (Wen-Feng Hsiao)
  • Date: Tue, 4 Jul 2000 15:22:12 -0400 (EDT)
  • Organization: NSYSU
  • Sender: owner-wri-mathgroup at wolfram.com

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?