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]