|
[Date Index]
[Thread Index]
[Author Index]
Re: Picewise Function
- To: mathgroup at smc.vnet.net
- Subject: [mg82090] Re: Picewise Function
- From: Girish Kulkarni <geeree at gmail.com>
- Date: Fri, 12 Oct 2007 02:48:21 -0400 (EDT)
- References: <fek98d$lae$1@smc.vnet.net>
Frank Hechtner wrote:
> Now i want mathematica to tell that this function uses a specific
> domain. The function should only be defined if the result of the
> evaluation is <= 0.25.
This sounds like you want to restrict the *range* of the function and
not its domain. In that case simply discard the value that the
function returns if it is greater than 0.25.
OTH, if you have to restrict the *domain*, you can use Condition
( /; ). See `Condition' in Mathematica help. For example:
q[x_] := x^2 /; x > 0
q[x_] := -x^2 /; x <= 0
defines a function piecewise. It evaluates to x^2 if x is positive and
to -x^2 if it is not.
--
Girish Kulkarni - Allahabad, India - http://girish.50webs.com
Prev by Date:
Convert to Text Display has no keyboard short cut
Next by Date:
Re: Typeset subscript on a operator
Previous by thread:
Picewise Function
Next by thread:
Re: Picewise Function
|