Mathematica 9 is now available
Student Support Forum
Student Support Forum: 'Queries from Wolfram Alpha in Mathematica' topicStudent Support Forum > General > "Queries from Wolfram Alpha in Mathematica"

Next Comment >Help | Reply To Topic
Author Comment/Response
Dave Martin
12/03/11 4:54pm

I am using Wolfram Mathematica 8, and I have a question about Wolfram Alpha queries.

I would like to store the result of a Wolfram Alpha query in a variable for later use in my calculations. I am not getting anywhere trying to do this.

For example, if I type:

== mass of proton in kilograms

(pressing the "=" key twice to get the query Wolfram Alpha prompt)

then I get a screen full of data which contains the actual answer I want (the mass of a proton in kilograms), embedded among many other cells which describe how Wolfram Alpha parsed my query, the assumptions used, additional unit conversions, and many such things.

However, all I want to do is to insert the result into a variable, for example:

p = "mass of proton in kilograms"

At the end of this process, I want the variable "p" to contain the value of the mass of a proton in kilograms, which is 1.672622 * 10^-27.

I am unable to figure out how to do this. I searched the documentation, and came across the WolframAlpha function. This has many options for PodCells, which I suppose are the various cells which contain different parts of the answer such as input interpretation and assumptions. Perhaps there is some way to drill down there and obtain only the relevant result, and store that in a variable. However, I was unable to figure out how.

In any case, it seems to be there would be some much easier way to do this with far less typing involved, since this is probably a very common thing that people do all the time.

Any help is much appreciated.

URL: ,

Subject (listing for 'Queries from Wolfram Alpha in Mathematica')
Author Date Posted
Queries from Wolfram Alpha in Mathematica Dave Martin 12/03/11 4:54pm
Re: Queries from Wolfram Alpha in Mathematica Dave Martin 12/04/11 3:58pm
Re: Queries from Wolfram Alpha in Mathematica Luc 12/05/11 09:06am
Next Comment >Help | Reply To Topic