Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2002

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

Search the Archive


  • To: mathgroup at
  • Subject: [mg35746] Max[Min[#,b],a]&
  • From: Selwyn Hollis <slhollis at>
  • Date: Sun, 28 Jul 2002 03:32:47 -0400 (EDT)
  • References: <ahtugt$qnb$>
  • Sender: owner-wri-mathgroup at

Since Mathgroup had so much fun with the recent problem of counting 
occurences of ...,1,0,... in a list of zeros and ones, I thought I'd try 
to bring the collective intelligence to bear on the following:

Given a matrix M of real numbers and a pair of real numbers a and b, 
what is the most efficient way to achieve the effect of applying the 
function Max[Min[#,b],a]& to each number in M?

Selwyn Hollis
slhollis at

  • Prev by Date: Controlling font size in user-defined Palettes?
  • Next by Date: Best way to convert graphics to slide show? (Mac OS 9)
  • Previous by thread: Controlling font size in user-defined Palettes?
  • Next by thread: Re: Max[Min[#,b],a]&