MathGroup Archive 2006

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

Search the Archive

Map-like behaviour for functions of more than a single argument?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg64519] Map-like behaviour for functions of more than a single argument?
  • From: "Matt" <anonmous69 at netscape.net>
  • Date: Mon, 20 Feb 2006 06:29:56 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Hello,
  I was wondering if there's a way to achieve the functionality of Map,
but with functions of more than one argument?

An example of how I'm 'working around' my perceived limitation of Map
functionality:

Clear[f, g];
f[z_, func_] := Module[{result}, result = func[Complex[Sequence @@ z]];

{Re[result], Im[result]}];
g[z_] := f[z, #1^2 & ];


Which, using 'g', I can use Map on a list of ordered pairs:


g /@ {{x,y}, {x,y}, {x,y}, {x,y}, etc.}


If I wanted to use Sin, I would redefine g as follows:


g[z_] := f[z, Sin];


then reapply to the list of ordered pairs.  So, I'm wondering if
there's a way to accomplish my task without the intermediary function
definition 'g'?  Also, if what I'm attempting is totally wrong, I'd
appreciate any pointers as to the correct 'path' as well.


Thanks,

Matt


  • Prev by Date: Re: Using Map with a function of more than 1 argument
  • Next by Date: Re: Re: Not Using a Text Editor Interface for Mathematica
  • Previous by thread: Re: LeftClick+Shift+Enter Reassign
  • Next by thread: Re: Map-like behaviour for functions of more than a single argument?