Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1997
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1997

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

Search the Archive

Re: Piecewise functions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg8927] Re: [mg8876] Piecewise functions
  • From: David Withoff <withoff>
  • Date: Sat, 4 Oct 1997 22:08:05 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

> Hi !
>
> I would like to know how to represent piecewise linear functions in
> Mathematica.  I tried searching on-line help but could not find any info
> regarding this.
>
> Thanks for your help
>
> Venkat

The answer to this question will depend on what you want to use the
piecewise linear functions for.  You can construct a piecewise linear
function using Interpolation[data, InterpolationOrder -> 1], or
you could use something like Which[x<0, 0, 0<=x<=1, x, x>1, 1], or
you could use some other approach.  The best way will depend on what
you plan to do with the result.

Dave Withoff
Wolfram Research


  • Prev by Date: Re: FindRoot
  • Next by Date: Deleting Graphics Elements
  • Previous by thread: Re: Piecewise functions
  • Next by thread: Re: Piecewise functions