|
[Date Index]
[Thread Index]
[Author Index]
Re: Defining function
- To: mathgroup at smc.vnet.net
- Subject: [mg44541] Re: [mg44539] Defining function
- From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
- Date: Fri, 14 Nov 2003 01:58:34 -0500 (EST)
- References: <200311131236.HAA23886@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
One of the nicest things about Mathematica is that although you are
clearly a beginner you have almost got it right!
f[t_]/;t>0 :=Exp[-I t];
f[t_]/;t<0 := 0;
Note that when you do that f[0] remains undefined. You can define it
separately, e.g
f[0] := Sqrt[Pi] or whatever.
Andrzej Kozlowski
Yokohama, Japan
http://www.mimuw.edu.pl/~akoz/
On 13 Nov 2003, at 21:36, Ravinder Kumar B. wrote:
> Dear All,
> How to define a function over two different ranges in mathematica.
> For example
>
> f(t):= Exp[-i*t] for t > 0 and
> = 0 for t < 0
>
> Your response/clarification will be deeply appreciated.
> Regards,
> Ravi
>
>
>
Prev by Date:
Re: Defining function
Next by Date:
Re: Defining function
Previous by thread:
Defining function
Next by thread:
Re: Defining function
|