Re: Need help integrating Wolfram Alpha data in Mathematica
- To: mathgroup at smc.vnet.net
- Subject: [mg123410] Re: Need help integrating Wolfram Alpha data in Mathematica
- From: Bob Hanlon <hanlonr357 at gmail.com>
- Date: Tue, 6 Dec 2011 03:12:44 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <201112051017.FAA04969@smc.vnet.net>
WolframAlpha["proton mass in kilograms","ComputableData"][[1]] 1.6726217*10^-27 Needs["PhysicalConstants`"] ProtonMass 1.67262*10^-27 Kilogram Bob Hanlon On Mon, Dec 5, 2011 at 5:17 AM, Dave M <cvk1812 at hotmail.com> wrote: > 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? >
- References:
- Need help integrating Wolfram Alpha data in Mathematica
- From: Dave M <cvk1812@hotmail.com>
- Need help integrating Wolfram Alpha data in Mathematica