MathGroup Archive 2008

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

Search the Archive

Re: How to find the Max of a Piecewise function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg90430] Re: [mg90411] How to find the Max of a Piecewise function
  • From: "W_Craig Carter" <ccarter at mit.edu>
  • Date: Wed, 9 Jul 2008 04:53:34 -0400 (EDT)
  • References: <200807081148.HAA10009@smc.vnet.net>

Hello Aaron,
The problem is here: f[Range[0,1,.001]

Compare:
f[Range[0,2,.1]]
Map[f[#] &, Range[0, 2, .1]]
Map[f, Range[0, 2, .1]]
f /@ Range[0, 2, .1]

WCC

On Tue, Jul 8, 2008 at 7:48 AM, Aaron Fude <aaronfude at gmail.com> wrote:

> f[x_] := Piecewise[{{1, x < 1}, {2, x > 1}}]
>
> then
>
> Max[f[Range[0, 1, .001]]]
>
> does not yield the desired result. What's the proper way to approach
> this?
>




-- 
W. Craig Carter


  • Prev by Date: Re: How to find the Max of a Piecewise function
  • Next by Date: Solving a DE using Mathematica
  • Previous by thread: How to find the Max of a Piecewise function
  • Next by thread: Re: How to find the Max of a Piecewise function