MathGroup Archive 2008

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

Search the Archive

Re: How to find the Max of a Piecewise function


SetAttributes[f, Listable];

f[x_] := Piecewise[{{1, x < 1}, {2, x > 1}}]

Max[f[Range[0, 1, .001]]]

1


Bob Hanlon

---- Aaron Fude <aaronfude at gmail.com> wrote: 

=============
Hi,

If f is deined according to

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?

Thanks!

Aaron




  • Prev by Date: Re: distribution fitting
  • Next by Date: Re: How to find the Max of a Piecewise function
  • Previous by thread: Re: How to find the Max of a Piecewise function
  • Next by thread: Re: How to find the Max of a Piecewise function