Re: Definitions of the functions
- To: mathgroup at smc.vnet.net
- Subject: [mg34980] Re: [mg34963] Definitions of the functions
- From: Hugh Walker <hwalker at gvtc.com>
- Date: Mon, 17 Jun 2002 03:26:58 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
On Saturday, June 15, 2002, at 11:23 PM, Pawe³ Ga³ecki wrote: > How do I define a function that is described by different formulas > depending > of the interval which the argument is given in???? > For example: > > y=x for -inf<x<-5 > y=x*x for -5<=x<18 > y=sin x for all the remaining values of x. > > > Anybody got a clue??? > > Thanks, > Pawe� Ga�ecki > > > > > > There are several ways to do this; here is one of them func[x_]:=x/;x<-5; func[x_]:=x^2/;x�-5&&x<18; func[x_]:= Sin[x]; ============ Hugh Walker Gnarly Oaks