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