Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'What was the name of the function' topicStudent Support Forum > General > "What was the name of the function"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
Author Comment/Response
Peter Pein
10/03/12 09:22am

Hi,

it is called "f" here ;)

f[in_]=ConstantArray[Mean[#], 2] - Boole[#[[1]] < Pi]& /@ Partition[in,2] // Flatten
f[{1, 2, 5, 6, 8, 9}]

--> {1/2, 1/2, 11/2, 11/2, 17/2, 17/2}

Peter


URL: ,

Subject (listing for 'What was the name of the function')
Author Date Posted
What was the name of the function speleomania 09/28/12 12:15pm
Re: What was the name of the function Michael 10/01/12 7:19pm
Re: What was the name of the function yehuda ben-s... 10/02/12 11:08am
Re: What was the name of the function Peter Pein 10/03/12 09:22am
Re: What was the name of the function speleomania 10/03/12 11:25am
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic