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

MathGroup Archive 2002

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

Search the Archive

Re: Definitions of the functions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg34979] Re: Definitions of the functions
  • From: Mark Westwood <MarkCWestwood at compuserve.com>
  • Date: Mon, 17 Jun 2002 03:26:56 -0400 (EDT)
  • Organization: CompuServe Interactive Services
  • References: <aeh407$dqb$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Pawe³

Try something like:

f[x_]:=x/;x<-5
f[x_]:=x*x/; -5<=x<18
f[x_]:=Sin[x]

Regards
Mark Westwood

"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


  • Prev by Date: How to compute a MatrixPower using: A^n = P D^n Inverse[P]
  • Next by Date: Re: Definitions of the functions
  • Previous by thread: Definitions of the functions
  • Next by thread: Re: Definitions of the functions