MathGroup Archive 2007

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

Search the Archive

Re: buliding on functions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg79104] Re: buliding on functions
  • From: chuck009 <dmilioto at comcast.com>
  • Date: Wed, 18 Jul 2007 03:06:12 -0400 (EDT)

This is an example of a set of three functions operating on a nested list.  I'm just using the shortcut for Map by mapping the list of functions onto the nested list of data:

In[34]:=
f1[x_]:=Sin[x];
f2[x_]:=Cos[x];
f3[x_]:=x^2;

Flatten[{f1[#],f2[#],f3[#]}& /@ {{1,2,3,4},{5,6,7}}]

Out[37]=
{Sin[1],Sin[2],Sin[3],Sin[4],Cos[1],Cos[2],Cos[3],Cos[4],1,4,9,16,
    Sin[5],Sin[6],Sin[7],Cos[5],Cos[6],Cos[7],25,36,49}


> so i have a group functions that i want to work on
> three list at the
> same time. everytime i've tryed to get mathematica to
> run through all
> at the smae time. i find out the functions only acted
> on one list. any
> ideas?
> 
>


  • Prev by Date: Re: N-dimensional NIntegrate
  • Next by Date: Re: Strange behaviour of Simplify
  • Previous by thread: Re: buliding on functions
  • Next by thread: Re: Re: buliding on functions