Re: Condition for pure functions
- To: mathgroup at smc.vnet.net
- Subject: [mg60309] Re: Condition for pure functions
- From: Peter Pein <petsie at dordos.net>
- Date: Sat, 10 Sep 2005 22:36:30 -0400 (EDT)
- References: <firstname.lastname@example.org> <email@example.com>
- Sender: owner-wri-mathgroup at wolfram.com
> Wonseok Shin wrote:
>>Suppose that f[x] is defined as:
>>f[x_ /; x > 0] := Sin[x];
>>f[x_ /; x <= 0] := Tan[x];
>>How can transform the above definition into a pure function?
>>f = Which[# > 0, Sin[#], # <= 0, Tan[#]] &
>>is a one solution. But is there any clever way to use Condition (/;)
>>instead of Which[...] ?
> does anybody have some informations of Lobachevski. if yes then please
> contact me
The articles in WikiPedia
are not enough?
The 10^5 entries in google http://www.google.gr/search?&q=Lobachevsky
should be sufficient....
Peter Pein, Berlin
GnuPG Key ID: 0xA34C5A82
Prev by Date:
Re: Timed Notebooks for Student Take-home examinations
Next by Date:
smooth eigenvalues and eigenvectors as a function of frequency
Previous by thread:
Re: Re: Condition for pure functions
Next by thread:
Timed Notebooks for Student Take-home examinations