Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Need Help to find max position location

  • To: mathgroup at smc.vnet.net
  • Subject: [mg86556] Need Help to find max position location
  • From: haitomi <tpnycity at yahoo.com>
  • Date: Thu, 13 Mar 2008 20:51:19 -0500 (EST)

Write a function that returns a list that gives the column 
location of the largest integer in each row of a matrix (a list of lists) 
of random integers between 10 and 99.

Example, for the following 3 X 4 matrix the result is

{1,2,1}

{
 {82, 71, 62, 47},
 {52, 96, 31, 36},
 {94, 52, 86, 12},
  
}

t = Table[RandomInteger[{30, 99}], {i, 1, 3}, {j, 1, 4}]

max = Map[Max, t]

pos=Position[.........]

I stuck to find the position of each row and the output look like the example above

Thank you all,

Tomi


  • Prev by Date: RE: Re: Insufficient capacity
  • Next by Date: help to find position location
  • Previous by thread: Mouth position with the GraphicsRow
  • Next by thread: Re: Need Help to find max position location