MathGroup Archive 2002

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

Search the Archive

Q: argmax

  • To: mathgroup at
  • Subject: [mg36667] Q: argmax
  • From: Jason Miller <millerj at>
  • Date: Wed, 18 Sep 2002 02:09:52 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

I never liked the function, but now I have need of it.  I hope 
someone can help me see the way to implement it.

For a class I am teaching I want to write a simple function that does 
a random search for a function's maxima.  I feed the function N 
randomly generated inputs and look at the outputs.  Provided N is 
large enough, the largest of the outputs I obtain should be near the 
function's maximum value.

What I want to be able to do is to identify the input that gave me 
that largest output.  Any ideas?

My only idea is this:  create a table of pairs {output, input{ and 
find the element of the table that has the largest first entry.  This 
will give me the input I seek.  Is there a slick way of doing this in 

Jason Miller, Ph.D.
Division of Mathematics and Computer Science
Truman State University
100 East Normal St.
Kirksville, MO  63501

  • Prev by Date: Re: problems with the definition of a function
  • Next by Date: Re: problems with the definition of a function
  • Previous by thread: Re: Front end proble in Linux
  • Next by thread: Plotting one point at a time with JLink