MathGroup Archive 2002

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

Search the Archive

Re: Define a function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg34573] Re: Define a function
  • From: lzhao at ihw.com.cn (Instanton)
  • Date: Wed, 29 May 2002 02:44:14 -0400 (EDT)
  • References: <acshar$ke2$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Michael,

Try this:

f[x_] := Which[x < 10, 0, x > 10 && x < 20, x, x > 20, x/2]


  • Prev by Date: Re: Why do parentheses spuriously appear when I type in a formula?
  • Next by Date: ParallelComputingToolkit ...
  • Previous by thread: Define a function
  • Next by thread: Re: Define a function