Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2001

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

Search the Archive

Re: don't understand #

  • To: mathgroup at smc.vnet.net
  • Subject: [mg28830] Re: [mg28813] don't understand #
  • From: BobHanlon at aol.com
  • Date: Tue, 15 May 2001 00:59:01 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Look at Outer

Outer[f[x, #1, #2]&, {1,2,3}, {a,b,c}]//Flatten

{f[x, 1, a], f[x, 1, b], 
  f[x, 1, c], f[x, 2, a], 
  f[x, 2, b], f[x, 2, c], 
  f[x, 3, a], f[x, 3, b], 
  f[x, 3, c]}

% == Flatten[Table[f[x, m, {a, b, c}[[n]]], {m, 3}, {n, 3}]]

True


Bob Hanlon

In a message dated 2001/5/14 1:46:38 AM, borut at email.si writes:

>I want a function f to map on two lists sequently... like Table!
>
>smth. like
>
>f[x,#(1st),#(2nd)]&/@{{1,2,3},{a,b,c}}
>
>should produce {f[x,1,a],f[x,1,b],...f[x,3,c]}
>


  • Prev by Date: Bug integrating
  • Next by Date: Creating graph with only a view data points
  • Previous by thread: Re: don't understand #
  • Next by thread: Re: don't understand #