MathGroup Archive 2011

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

Search the Archive

Need help integrating Wolfram Alpha data in Mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg123398] Need help integrating Wolfram Alpha data in Mathematica
  • From: Dave M <cvk1812 at hotmail.com>
  • Date: Mon, 5 Dec 2011 05:17:07 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com

I'm using Wolfram Mathematica 8, and I have a question about using Wolfram Alpha data in my calculations.

What I would like to do is to pull data from the Wolfram Alpha search engine, and then store it in a Mathematica variable for future use. I cannot figure out how to do this easily.

To illustrate what I mean, here's a simple example. Let's say I want the mass of a proton in kilograms. I can obtain this by simply typing "== mass of proton in kilograms", upon which Mathematica contacts the Wolfram Alpha server, and downloads a lot of data.

This data doesn't only contain the actual number I wanted, it is actually a huge table with many cells containing information about how Wolfram Alpha parsed my query, the assumptions used, conversions of the answer to various other units, etc.

However, all I wanted was simply the answer to my query in a computable numeric form, so I could store that in a variable in Mathematica.

I can get somewhat usable results if I do something like this:

WolframAlpha["mass of proton in kilograms", {{"Result", 1}, 
  "ComputableData"}]

However, this is a pretty complicated way of doing something really simple. Is there some simpler method that involves much less typing?



  • Prev by Date: Re: How to simplify ArcSin formula
  • Next by Date: Re: How to get elements satisfying specific condition from a list
  • Previous by thread: Image Processing
  • Next by thread: Re: Need help integrating Wolfram Alpha data in Mathematica