Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

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: <de9dbs$qa3$1@smc.vnet.net> <dfue4l$1sb$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Misa schrieb:
> Wonseok Shin wrote:
> 
>>Hello everyone,
>>
>>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?
>>
>>I know
>>
>>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

http://en.wikipedia.org/wiki/Special:Search?search=Lobachevski&go=Go

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
http://people.freenet.de/Peter_Berlin/


  • 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