Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

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

Search the Archive

How to make {f,g}[a,b,c] to become {{f[a],g[a]},{f[b],g[b]},{f[c],g[c]}}

  • To: mathgroup at smc.vnet.net
  • Subject: [mg105301] How to make {f,g}[a,b,c] to become {{f[a],g[a]},{f[b],g[b]},{f[c],g[c]}}
  • From: Lawrence Teo <lawrenceteo at yahoo.com>
  • Date: Fri, 27 Nov 2009 06:27:50 -0500 (EST)

I have a question. How to make {f,g}[a,b,c] to become {{f[a],g[a]},{f
[b],g[b]},{f[c],g[c]}}?

I want to do {GPD, Population} for all countries.

Something similar to the following...
{CountryData[#, "GDP"] &, CountryData[#, "Population"] &} /@
 CountryData[]

It ends up in the form of {f,g}[a,b,c,d,...]. I need a way to
'distribute' the country name into the GDP and Population portion.

Thanks.


  • Prev by Date: Re: Re: random walk visualization
  • Next by Date: test implication
  • Previous by thread: Re: Kernel crashes in ReplaceAll - with or without Maximize
  • Next by thread: Re: How to make {f,g}[a,b,c] to become