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
- References:
- How to find the Max of a Piecewise function
- From: Aaron Fude <aaronfude@gmail.com>
- How to find the Max of a Piecewise function